+
    wi.                         ^ RI HtHt ^ RIHtHtHtHtHt  ! R R]4      t	 ! R R]
4      t ! R R]
4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )    )AnyLiteral)
AnyHttpUrlAnyUrl	BaseModelFieldfield_validatorc                   v   a  ] tR t^t o RtRtRtRtRt]	! RRR7      ]
V 3R lR l4       4       tV 3R	 ltR
tV tR# )
OAuthTokenz?
See https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
BearerN
token_typebefore)modec                B   < V ^8  d   QhRS[ R,          RS[ R,          /# )   vNreturnstr)format__classdict__s   "C/home/ubuntu/.local/lib/python3.14/site-packages/mcp/shared/auth.py__annotate__OAuthToken.__annotate__   s#      S4Z C$J     c                R    \        V\        4      '       d   VP                  4       # V# N)
isinstancer   title)clsr   s   &&r   normalize_token_typeOAuthToken.normalize_token_type   s$     a 779r   c                   < V ^8  d   Qh/ S[ ;R&   S[R,          ;R&   S[R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   # )r   access_tokenr   r   N
expires_inscoperefresh_token)r   r   int)r   r   s   "r   r   r      sW     
   !,  d
!  :  :$ r    )__name__
__module____qualname____firstlineno____doc__r   r%   r&   r'   r	   classmethodr!   __annotate_func____static_attributes____classdictcell__r   s   @r   r   r      sH     
 %-J!JE $M\1  2  r   r   c                   2   a  ] tR t^t o V 3R lR ltRtV tR# )InvalidScopeErrorc                    < V ^8  d   QhRS[ /# r   messager   )r   r   s   "r   r   InvalidScopeError.__annotate__          r   c                    Wn         R # r   r8   selfr8   s   &&r   __init__InvalidScopeError.__init__       r   r<   Nr*   r+   r,   r-   r?   r1   r2   r3   s   @r   r5   r5            r   r5   c                   2   a  ] tR t^ t o V 3R lR ltRtV tR# )InvalidRedirectUriErrorc                    < V ^8  d   QhRS[ /# r7   r   )r   r   s   "r   r   $InvalidRedirectUriError.__annotate__!   r:   r   c                    Wn         R # r   r<   r=   s   &&r   r?    InvalidRedirectUriError.__init__!   rA   r   r<   NrB   r3   s   @r   rE   rE       rC   r   rE   c                      a  ] tR t^%t o Rt]! R^R7      tRtRR.tR.t	Rt
RtRtRtRtRtRtRtRtRtRtV 3R lR	 ltV 3R
 lR ltV 3R ltRtV tR# )OAuthClientMetadataz
RFC 7591 OAuth 2.0 Dynamic Client Registration metadata.
See https://datatracker.ietf.org/doc/html/rfc7591#section-2
for the full specification.
.
min_lengthNauthorization_coder'   codec                R   < V ^8  d   QhRS[ R,          RS[S[ ,          R,          /# )r   requested_scopeNr   )r   list)r   r   s   "r   r    OAuthClientMetadata.__annotate__J   s(        cDj  T#Y=M  r   c                    Vf   R # VP                  R4      pV P                  f   . MV P                  P                  R4      pV F  pWC9  g   K  \        RV 24      h	  V# )N z%Client was not registered with scope )splitr&   r5   )r>   rQ   requested_scopesallowed_scopesr&   s   &&   r   validate_scope"OAuthClientMetadata.validate_scopeJ   sg    "*005#zz1tzz7G7G7L%E*'*OPUw(WXX &  r   c                4   < V ^8  d   QhRS[ R,          RS[ /# )r   redirect_uriNr   )r   )r   r   s   "r   r   rS   T   s#     	u 	u&4- 	uF 	ur   c                    Ve0   V P                   e   WP                   9  d   \        RV R24      hV# V P                   e.   \        V P                   4      ^8X  d   V P                   ^ ,          # \        R4      h)NzRedirect URI 'z' not registered for clientzGredirect_uri must be specified when client has multiple registered URIs)redirect_urisrE   len)r>   r\   s   &&r   validate_redirect_uri)OAuthClientMetadata.validate_redirect_uriT   su    #!!)\ASAS-S-|nLg.hii+D4F4F0G10L%%a(()*sttr   c                  < V ^8  d   Qh/ S[ S[,          R,          ;R&   S[R,          R,          ;R&   S[ S[R,          S[,          ,          ;R&   S[ S[,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R	&   S[ S[,          R,          ;R
&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r   Nr^   token_endpoint_auth_methodgrant_typesresponse_typesr&   client_name
client_urilogo_uricontactstos_uri
policy_urijwks_urijwkssoftware_idsoftware_version)noneclient_secret_postclient_secret_basicprivate_key_jwt)rN   r'   z+urn:ietf:params:oauth:grant-type:jwt-bearer)rR   r   r   r   r   r   )r   r   s   "r   r   rS   %   s7     <$&A  	VWZ^^  dehkk  * I(+ , :- 4 t"5 6 T!(7 8 4&9 : 3i$%; < $%= > T!(? @ 4&A B *C D t"E F Dj'G r   r)   )r*   r+   r,   r-   r.   r   r^   rc   rd   re   r&   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rY   r`   r0   r1   r2   r3   s   @r   rK   rK   %   s      */sq)AM 	  		  "(NE #K$(J"&H!%H!%G$(J"&HD"K#'   	u 	u_  r   rK   c                   @   a  ] tR t^`t o RtRtRtRtRtV 3R lt	Rt
V tR# )OAuthClientInformationFullzb
RFC 7591 OAuth 2.0 Dynamic Client Registration full response
(client information plus metadata).
Nc                   < V ^8  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r   N	client_idclient_secretclient_id_issued_atclient_secret_expires_at)r   r(   )r   r   s   "r   r   'OAuthClientInformationFull.__annotate__`   sI      Tz   :$  t*  "Dj/ r   r)   )r*   r+   r,   r-   r.   rw   rx   ry   rz   r0   r1   r2   r3   s   @r   ru   ru   `   s)     
 !I $M&*+/  r   ru   c                   ~   a  ] tR t^lt o RtRtRtR.tRtRt	Rt
RtRtRtRtRtRtRtRtRtRtRtRtRtV 3R ltRtV tR# )OAuthMetadatazo
RFC 8414 OAuth 2.0 Authorization Server Metadata.
See https://datatracker.ietf.org/doc/html/rfc8414#section-2
NrO   c                  < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[S[,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R	&   S[S[,          R,          ;R
&   S[S[,          R,          ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[R,          ;R&   # )r   issuerauthorization_endpointtoken_endpointNregistration_endpointscopes_supportedresponse_types_supportedresponse_modes_supportedgrant_types_supported%token_endpoint_auth_methods_supported0token_endpoint_auth_signing_alg_values_supportedservice_documentationui_locales_supportedop_policy_uri
op_tos_urirevocation_endpoint*revocation_endpoint_auth_methods_supported5revocation_endpoint_auth_signing_alg_values_supportedintrospection_endpoint-introspection_endpoint_auth_methods_supported8introspection_endpoint_auth_signing_alg_values_supported code_challenge_methods_supported%client_id_metadata_document_supportedr   rR   r   bool)r   r   s   "r   r   OAuthMetadata.__annotate__l   s       '&    &,3  3i$&-  #3i2  #3i$.5   9t+2  ,09t+;B  7;3i$6FM   &,3! " s)d*1# $ $+% & T!(' ( $d*1) * 15S	D0@G+ , <@9t;KR- . '-4/ 0 489t3CJ1 2 ?C3i$>NU3 4 '+3i$&6=5 6 ,0$;=7 r   r)   )r*   r+   r,   r-   r.   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r0   r1   r2   r3   s   @r   r}   r}   l   s      04)-+1(15.2>B)IM4/3-1'+M$(J-1CG.NR904FJ1QU<9=$9=)7  r   r}   c                      a  ] tR t^t o Rt]! R^R7      tRtRt]! R.R7      t	Rt
RtRtRtRtRtRtRtRtV 3R ltRtV tR# )	ProtectedResourceMetadatazm
RFC 9728 OAuth 2.0 Protected Resource Metadata.
See https://datatracker.ietf.org/doc/html/rfc9728#section-2
.rL   Nheader)defaultc                  < V ^8  d   Qh/ S[ ;R&   S[S[ ,          ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[R,          ;R&   S[ R,          ;R	&   S[ R,          ;R
&   S[ R,          ;R&   S[R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[R,          ;R&   # )r   resourceauthorization_serversNrl   r   bearer_methods_supported%resource_signing_alg_values_supportedresource_nameresource_documentationresource_policy_uriresource_tos_uri*tls_client_certificate_bound_access_tokens%authorization_details_types_supported!dpop_signing_alg_values_supported!dpop_bound_access_tokens_requiredr   )r   r   s   "r   r   &ProtectedResourceMetadata.__annotate__   s        
+F  4&  3i$&-  #3i$.J  ,09t+;B  :$  '-4  $d*1  !4'. " 15tB# $ ,09t+;B% & (,Cy4'7>' * (,d{9+ r   r)   )r*   r+   r,   r-   r.   r   r   rl   r   r   r   r   r   r   r   r   r   r   r   r0   r1   r2   r3   s   @r   r   r      sm      /4CA.F"&H)-16z1J>B) $M04-1*.>B.>B):>%59%+  r   r   N)typingr   r   pydanticr   r   r   r   r	   r   	Exceptionr5   rE   rK   ru   r}   r   r)   r   r   <module>r      sf     J J *	 
i 
8u) 8uv	0!4 	0>I ><:	 :r   