metadata
oauthlib.oauth2.rfc6749.endpoint.metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An implementation of the OAuth 2.0 Authorization Server Metadata
.
.. _OAuth 2.0 Authorization Server Metadata
: https://tools.ietf.org/html/rfc8414
MetadataEndpoint
Bases: BaseEndpoint
OAuth2.0 Authorization Server Metadata endpoint.
This specification generalizes the metadata format defined by 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
_] generalized the dynamic client registration mechanisms defined by OpenID Connect Dynamic Client Registration 1.0 in a way that is compatible with it.
.. OpenID Connect Discovery 1.0
: https://openid.net/specs/openid-connect-discovery-1_0.html .. RFC7591
: https://tools.ietf.org/html/rfc7591
Source code in server/vendor/oauthlib/oauth2/rfc6749/endpoints/metadata.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
|
create_metadata_response(uri, http_method='GET', body=None, headers=None)
Create metadata response
Source code in server/vendor/oauthlib/oauth2/rfc6749/endpoints/metadata.py
51 52 53 54 55 56 57 58 59 60 |
|
validate_metadata_server()
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 section 2
_ :
issuer REQUIRED
authorization_endpoint URL of the authorization server's authorization endpoint [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#Token
_]. This is REQUIRED unless only the implicit grant type is supported.
scopes_supported RECOMMENDED.
response_types_supported REQUIRED.
Other OPTIONAL fields
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
_].
.. 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
Source code in server/vendor/oauthlib/oauth2/rfc6749/endpoints/metadata.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
|
validate_metadata_token(claims, endpoint)
If the token endpoint is used in the grant type, the value of this parameter MUST be the same as the value of the "grant_type" parameter passed to the token endpoint defined in the grant type definition.
Source code in server/vendor/oauthlib/oauth2/rfc6749/endpoints/metadata.py
87 88 89 90 91 92 93 94 95 96 97 98 99 |
|