diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2018-12-20 15:32:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-20 15:32:18 +0100 |
commit | 3893b1764af522970e143f422967338eecbb9c1e (patch) | |
tree | 74afb6e035f064ffe142bb97381936eb187dc77b /oauthlib/oauth2/rfc6749 | |
parent | 347e4aaf41d1688d47912e44364d2e51adf30280 (diff) | |
parent | cbb13792261b2df5c5ff408f9e73cdcb99aa94dd (diff) | |
download | oauthlib-3893b1764af522970e143f422967338eecbb9c1e.tar.gz |
Merge branch 'master' into dry-up-codedry-up-code
Diffstat (limited to 'oauthlib/oauth2/rfc6749')
-rw-r--r-- | oauthlib/oauth2/rfc6749/endpoints/metadata.py | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/oauthlib/oauth2/rfc6749/endpoints/metadata.py b/oauthlib/oauth2/rfc6749/endpoints/metadata.py index 60c846b..936e878 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/metadata.py +++ b/oauthlib/oauth2/rfc6749/endpoints/metadata.py @@ -33,14 +33,13 @@ class MetadataEndpoint(BaseEndpoint): `OpenID Connect Discovery 1.0` in a way that is compatible with OpenID Connect Discovery while being applicable to a wider set of OAuth 2.0 use cases. This is intentionally parallel to the way - that `OAuth 2.0 Dynamic Client Registration Protocol` [RFC7591] + that OAuth 2.0 Dynamic Client Registration Protocol [`RFC7591`_] generalized the dynamic client registration mechanisms defined by - `OpenID Connect Dynamic Client Registration 1.0` + OpenID Connect Dynamic Client Registration 1.0 in a way that is compatible with it. - .. _`OpenID Connect Discovery 1.0`: http://openid.net/specs/openid-connect-discovery-1_0.html - .. _`OAuth 2.0 Dynamic Client Registration Protocol`: https://tools.ietf.org/html/rfc7591 - .. _`OpenID Connect Dynamic Client Registration 1.0`: https://openid.net/specs/openid-connect-registration-1_0.html + .. _`OpenID Connect Discovery 1.0`: https://openid.net/specs/openid-connect-discovery-1_0.html + .. _`RFC7591`: https://tools.ietf.org/html/rfc7591 """ def __init__(self, endpoints, claims={}, raise_errors=True): @@ -146,18 +145,19 @@ class MetadataEndpoint(BaseEndpoint): """ Authorization servers can have metadata describing their configuration. The following authorization server metadata values - are used by this specification. More details can be found in `RFC8414` : + are used by this specification. More details can be found in + `RFC8414 section 2`_ : issuer REQUIRED authorization_endpoint URL of the authorization server's authorization endpoint - [RFC6749]. This is REQUIRED unless no grant types are supported + [`RFC6749#Authorization`_]. This is REQUIRED unless no grant types are supported that use the authorization endpoint. token_endpoint - URL of the authorization server's token endpoint [RFC6749]. This + URL of the authorization server's token endpoint [`RFC6749#Token`_]. This is REQUIRED unless only the implicit grant type is supported. scopes_supported @@ -170,26 +170,50 @@ class MetadataEndpoint(BaseEndpoint): jwks_uri registration_endpoint response_modes_supported + grant_types_supported + OPTIONAL. JSON array containing a list of the OAuth 2.0 grant + type values that this authorization server supports. The array + values used are the same as those used with the "grant_types" + parameter defined by "OAuth 2.0 Dynamic Client Registration + Protocol" [`RFC7591`_]. If omitted, the default value is + "["authorization_code", "implicit"]". + token_endpoint_auth_methods_supported + token_endpoint_auth_signing_alg_values_supported + service_documentation + ui_locales_supported + op_policy_uri + op_tos_uri + revocation_endpoint + revocation_endpoint_auth_methods_supported + revocation_endpoint_auth_signing_alg_values_supported + introspection_endpoint + introspection_endpoint_auth_methods_supported + introspection_endpoint_auth_signing_alg_values_supported + code_challenge_methods_supported Additional authorization server metadata parameters MAY also be used. Some are defined by other specifications, such as OpenID Connect - Discovery 1.0 [OpenID.Discovery]. + Discovery 1.0 [`OpenID.Discovery`_]. .. _`RFC8414 section 2`: https://tools.ietf.org/html/rfc8414#section-2 + .. _`RFC6749#Authorization`: https://tools.ietf.org/html/rfc6749#section-3.1 + .. _`RFC6749#Token`: https://tools.ietf.org/html/rfc6749#section-3.2 + .. _`RFC7591`: https://tools.ietf.org/html/rfc7591 + .. _`OpenID.Discovery`: https://openid.net/specs/openid-connect-discovery-1_0.html """ claims = copy.deepcopy(self.initial_claims) self.validate_metadata(claims, "issuer", is_required=True, is_issuer=True) |