mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 14:54:24 +01:00
Use 120 characters instead of 88 (#856)
This commit is contained in:
committed by
GitHub
parent
f7265f7b91
commit
543961968c
@@ -45,9 +45,7 @@ class OAuthClientMetadata(BaseModel):
|
||||
# token_endpoint_auth_method: this implementation only supports none &
|
||||
# client_secret_post;
|
||||
# ie: we do not support client_secret_basic
|
||||
token_endpoint_auth_method: Literal["none", "client_secret_post"] = (
|
||||
"client_secret_post"
|
||||
)
|
||||
token_endpoint_auth_method: Literal["none", "client_secret_post"] = "client_secret_post"
|
||||
# grant_types: this implementation only supports authorization_code & refresh_token
|
||||
grant_types: list[Literal["authorization_code", "refresh_token"]] = [
|
||||
"authorization_code",
|
||||
@@ -84,17 +82,12 @@ class OAuthClientMetadata(BaseModel):
|
||||
if redirect_uri is not None:
|
||||
# Validate redirect_uri against client's registered redirect URIs
|
||||
if redirect_uri not in self.redirect_uris:
|
||||
raise InvalidRedirectUriError(
|
||||
f"Redirect URI '{redirect_uri}' not registered for client"
|
||||
)
|
||||
raise InvalidRedirectUriError(f"Redirect URI '{redirect_uri}' not registered for client")
|
||||
return redirect_uri
|
||||
elif len(self.redirect_uris) == 1:
|
||||
return self.redirect_uris[0]
|
||||
else:
|
||||
raise InvalidRedirectUriError(
|
||||
"redirect_uri must be specified when client "
|
||||
"has multiple registered URIs"
|
||||
)
|
||||
raise InvalidRedirectUriError("redirect_uri must be specified when client " "has multiple registered URIs")
|
||||
|
||||
|
||||
class OAuthClientInformationFull(OAuthClientMetadata):
|
||||
|
||||
Reference in New Issue
Block a user