+
    VùCi>)  ã                   ó¬   € R t ^ RIt^ RIt^ RIt^RIHtHt ^RIHt ^RI	H
t
Ht ^RIHt ^RIHt ^RIHt ]P$                  ! ]4      t ! R R	]
4      tR# )
zð
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
N)Úgrant_typesÚutils)ÚAuthorizationEndpoint)ÚBaseEndpointÚcatch_errors_and_unavailability)ÚIntrospectEndpoint)ÚRevocationEndpoint)ÚTokenEndpointc                   ón   a € ] tR t^t o Rt/ R3R lt]RR l4       tRR ltR t	R t
R	 tR
 tR tRtV tR# )ÚMetadataEndpointaœ  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
Tc                óò   € \        V\        4      '       g   Q hV F  p\        V\        4      '       d   K  Q h	  \        P                  ! V 4       W0n        Wn        W n        V P                  4       V n        R # )N)	Ú
isinstanceÚdictr   Ú__init__Úraise_errorsÚ	endpointsÚinitial_claimsÚvalidate_metadata_serverÚclaims)Úselfr   r   r   Úendpoints   &&&& ÚL/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/metadata.pyr   ÚMetadataEndpoint.__init__(   sc   € Ü˜&¤$×'Ò'Ð'Ð'Û!ˆHÜ˜h¬×5Ô5Ð5Ð5ñ "ô 	×Ò˜dÔ#Ø(ÔØ"ŒØ$ÔØ×3Ñ3Ó5ˆŽó    Nc                óT   € RRRR/pV\         P                  ! V P                  4      ^È3# )z!Create metadata response
        zContent-Typezapplication/jsonzAccess-Control-Allow-OriginÚ*)ÚjsonÚdumpsr   )r   ÚuriÚhttp_methodÚbodyÚheaderss   &&&&&r   Úcreate_metadata_responseÚ)MetadataEndpoint.create_metadata_response3   s2   € ð Ð.Ø)¨3ð
ˆð œŸ
š
 4§;¡;Ó/°Ð4Ð4r   c                óX  € V P                   '       g   R # W!9  d%   V'       d   \        RP                  V4      4      hR # V'       dŽ   \        P                  ! W,          4      '       g"   \        RP                  W!V,          4      4      hRW,          9   g   RW,          9   g   RW,          9   d"   \        RP                  W!V,          4      4      hR # V'       dA   W,          P                  R4      '       g"   \        RP                  W!V,          4      4      hR # V'       d‡   \        W,          \        4      '       g"   \        R	P                  W!V,          4      4      hW,           F;  p\        V\        4      '       d   K  \        R
P                  W!V,          V4      4      h	  R # R # )Nzkey {} is a mandatory metadata.zkey {}: {} must be an HTTPS URLÚ?Ú&Ú#z8key {}: {} must not contain query or fragment componentsÚhttpzkey {}: {} must be an URLzkey {}: {} must be an Arrayz/array {}: {} must contains only string (not {}))	r   Ú
ValueErrorÚformatr   Úis_secure_transportÚ
startswithr   ÚlistÚstr)r   ÚarrayÚkeyÚis_requiredÚis_listÚis_urlÚ	is_issuerÚelems   &&&&&&& r   Úvalidate_metadataÚ"MetadataEndpoint.validate_metadata>   sS  € Ø× × Ð ÙàÔßÜ Ð!B×!IÑ!IÈ#Ó!NÓOÐOñ ÷ Ü×,Ò,¨U­Z×8Ò8Ü Ð!B×!IÑ!IÈ#ÐUXÍzÓ!ZÓ[Ð[Ø�e•jÔ  C¨5­:Ô$5¸ÀÅ
Ô9JÜ Ð![×!bÑ!bÐcfÐnqÕhrÓ!sÓtÐtñ :K÷ Ø•:×(Ñ(¨×0Ò0Ü Ð!<×!CÑ!CÀCÈsÍÓ!TÓUÐUñ 1÷ Ü˜e�j¬$×/Ò/Ü Ð!>×!EÑ!EÀcÐQTÍ:Ó!VÓWÐWØŸ
˜
�Ü! $¬×,Ô,Ü$Ð%V×%]Ñ%]Ð^aÐilÕcmÐosÓ%tÓuÐuó #ñ r   c                ó  € V P                   P                  VP                   P                  4       4       VP                  RRR.4       V P	                  VRRR7       V P	                  VRRR7       V P	                  VRRRR7       R	# )
zÍ
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.
Ú%token_endpoint_auth_methods_supportedÚclient_secret_postÚclient_secret_basicT©r2   Ú0token_endpoint_auth_signing_alg_values_supportedÚtoken_endpoint©r1   r3   N)Ú_grant_typesÚextendÚkeysÚ
setdefaultr6   ©r   r   r   s   &&&r   Úvalidate_metadata_tokenÚ(MetadataEndpoint.validate_metadata_tokenW   s†   € ð 	×Ñ× Ñ  ×!6Ñ!6×!;Ñ!;Ó!=Ô>Ø×ÑÐAÐDXÐZoÐCpÔqà×Ñ˜vÐ'NÐX\ÐÔ]Ø×Ñ˜vÐ'YÐcgÐÔhØ×Ñ˜vÐ'7ÀTÐRVÐÖWr   c           
     óÄ  € VP                  R \        \        R VP                  P	                  4       4      4      4       VP                  RRR.4       RVR ,          9   d   V P
                  P                  R4       V P                  VR RRR7       V P                  VRRR	7       R
VR ,          9   d™   VP                  R
,          p\        V\        P                  4      '       g   \        VR4      '       d   VP                  pVP                  R\        VP                  P	                  4       4      4       V P                  VRRR	7       V P                  VRRRR7       R# )Úresponse_types_supportedc                 ó   € V R 8g  # )Únone© )Úxs   &r   Ú<lambda>ÚBMetadataEndpoint.validate_metadata_authorization.<locals>.<lambda>g   s   € °°V²r   Úresponse_modes_supportedÚqueryÚfragmentÚtokenÚimplicitT)r1   r2   r<   ÚcodeÚdefault_grantÚ code_challenge_methods_supportedÚauthorization_endpointr?   N)rC   r-   ÚfilterÚ_response_typesrB   r@   Úappendr6   r   r   ÚAuthorizationCodeGrantÚhasattrrU   Ú_code_challenge_methods)r   r   r   Ú
code_grants   &&& r   Úvalidate_metadata_authorizationÚ0MetadataEndpoint.validate_metadata_authorizatione   s@  € Ø×ÑÐ4ÜœvÑ&;¸X×=UÑ=U×=ZÑ=ZÓ=\Ó]Ó^ô	`à×ÑÐ4°wÀ
Ð6KÔLð
 �fÐ7Õ8Ô8Ø×Ñ×$Ñ$ ZÔ0à×Ñ˜vÐ'AÈtÐ]aÐÔbØ×Ñ˜vÐ'AÈ4ÐÔPØ�VÐ6Õ7Ô7Ø!×1Ñ1°&Õ9ˆJÜ˜j¬+×*LÑ*L×MÒMÔRYÐZdÐfu×RvÒRvØ'×5Ñ5�
à×ÑÐ@Ü" :×#EÑ#E×#JÑ#JÓ#LÓMôOà×"Ñ" 6Ð+MÐW[Ð"Ô\Ø×Ñ˜vÐ'?ÈTÐZ^ÐÖ_r   c                ó¨   € VP                  R RR.4       V P                  VR RR7       V P                  VRRR7       V P                  VRRRR7       R# )	Ú*revocation_endpoint_auth_methods_supportedr:   r;   Tr<   Ú5revocation_endpoint_auth_signing_alg_values_supportedÚrevocation_endpointr?   N©rC   r6   rD   s   &&&r   Úvalidate_metadata_revocationÚ-MetadataEndpoint.validate_metadata_revocation|   sf   € Ø×ÑÐFØ/Ð1FÐGô	Ið 	×Ñ˜vÐ'SÐ]aÐÔbØ×Ñ˜vÐ'^ÐhlÐÔmØ×Ñ˜vÐ'<È$ÐW[ÐÖ\r   c                ó¨   € VP                  R RR.4       V P                  VR RR7       V P                  VRRR7       V P                  VRRRR7       R# )	Ú-introspection_endpoint_auth_methods_supportedr:   r;   Tr<   Ú8introspection_endpoint_auth_signing_alg_values_supportedÚintrospection_endpointr?   Nre   rD   s   &&&r   Úvalidate_metadata_introspectionÚ0MetadataEndpoint.validate_metadata_introspection„   sf   € Ø×ÑÐIØ/Ð1FÐGô	Ið 	×Ñ˜vÐ'VÐ`dÐÔeØ×Ñ˜vÐ'aÐkoÐÔpØ×Ñ˜vÐ'?ÈTÐZ^ÐÖ_r   c                ó0  € \         P                  ! V P                  4      pV P                  VRRRR7       V P                  VRRR7       V P                  VRRR7       V P                  VRRR7       V P                  VR	RR7       V P                  VR
RR7       V P                  VRRR7       . V n        V P
                   F¡  p\        V\        4      '       d   V P                  W4       \        V\        4      '       d   V P                  W4       \        V\        4      '       d   V P                  W4       \        V\        4      '       g   K�  V P                  W4       K£  	  VP                  RV P                  4       V P                  VRRR7       V# )aN  
 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
 ÚissuerT)r1   r4   Újwks_uri)r3   Úscopes_supportedr<   Úservice_documentationÚui_locales_supportedÚop_policy_uriÚ
op_tos_uriÚgrant_types_supported)ÚcopyÚdeepcopyr   r6   r@   r   r   r	   rE   r   r_   r   rf   r   rl   rC   rD   s   &  r   r   Ú)MetadataEndpoint.validate_metadata_serverŒ   sj  € ôT —’˜t×2Ñ2Ó3ˆØ×Ñ˜v x¸TÈTÐÔRØ×Ñ˜v z¸$ÐÔ?Ø×Ñ˜vÐ'9À4ÐÔHØ×Ñ˜vÐ'>ÀtÐÔLØ×Ñ˜vÐ'=ÀtÐÔLØ×Ñ˜v ¸tÐÔDØ×Ñ˜v |¸DÐÔAàˆÔØŸœˆHÜ˜(¤M×2Ò2Ø×,Ñ,¨VÔ>Ü˜(Ô$9×:Ò:Ø×4Ñ4°VÔFÜ˜(Ô$6×7Ò7Ø×1Ñ1°&ÔCÜ˜(Ô$6×7Ô7Ø×4Ñ4°VÖFñ 'ð 	×ÑÐ1°4×3DÑ3DÔEØ×Ñ˜vÐ'>ÈÐÔMØˆr   )r@   r   r   r   r   )ÚGETNN)FFFF)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r"   r6   rE   r_   rf   rl   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      sT   ø‡ € ñð *,¸$ô 	6ð %ó5ó %ð5ôvò2Xò`ò.]ò`÷bð br   r   )r   rw   r   ÚloggingÚ r   r   Úauthorizationr   Úbaser   r   Ú
introspectr   Ú
revocationr   rR   r	   Ú	getLoggerr{   Úlogr   rK   r   r   Ú<module>r‹      sE   ðñó Û Û ç !Ý 0ß ?Ý *Ý *Ý  à×Ò˜Ó!€ôW�|ö Wr   