Skip to content

Commit a79562f

Browse files
committed
reduce validation
1 parent d941508 commit a79562f

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

src/mcp/shared/auth.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,19 @@ class OAuthMetadata(BaseModel):
120120
token_endpoint: AnyHttpUrl
121121
registration_endpoint: AnyHttpUrl | None = None
122122
scopes_supported: list[str] | None = None
123-
response_types_supported: list[Literal["code"] | str] = ["code"]
123+
response_types_supported: list[str] = ["code"]
124124
response_modes_supported: list[Literal["query", "fragment"]] | None = None
125-
grant_types_supported: (
126-
list[Literal["authorization_code", "refresh_token"] | str] | None
127-
) = None
128-
token_endpoint_auth_methods_supported: (
129-
list[Literal["none", "client_secret_post"] | str] | None
130-
) = None
125+
grant_types_supported: list[str] | None = None
126+
token_endpoint_auth_methods_supported: list[str] | None = None
131127
token_endpoint_auth_signing_alg_values_supported: None = None
132128
service_documentation: AnyHttpUrl | None = None
133129
ui_locales_supported: list[str] | None = None
134130
op_policy_uri: AnyHttpUrl | None = None
135131
op_tos_uri: AnyHttpUrl | None = None
136132
revocation_endpoint: AnyHttpUrl | None = None
137-
revocation_endpoint_auth_methods_supported: (
138-
list[Literal["client_secret_post"] | str] | None
139-
) = None
133+
revocation_endpoint_auth_methods_supported: list[str] | None = None
140134
revocation_endpoint_auth_signing_alg_values_supported: None = None
141135
introspection_endpoint: AnyHttpUrl | None = None
142-
introspection_endpoint_auth_methods_supported: (
143-
list[Literal["client_secret_post"] | str] | None
144-
) = None
136+
introspection_endpoint_auth_methods_supported: list[str] | None = None
145137
introspection_endpoint_auth_signing_alg_values_supported: None = None
146-
code_challenge_methods_supported: list[Literal["S256"] | str] | None = None
138+
code_challenge_methods_supported: list[str] | None = None

0 commit comments

Comments
 (0)