+
    xj                         ^ 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   "g/Users/bertmahoney/workspace/ai-archive/.venv-openbrain/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   r:   selfr:   s   &&r   __init__InvalidScopeError.__init__       r   r>   Nr,   r-   r.   r/   rA   r3   r4   r5   s   @r   r7   r7            r   r7   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[ /# r9   r   )r   r   s   "r   r   $InvalidRedirectUriError.__annotate__!   r<   r   c                    Wn         R # r   r>   r?   s   &&r   rA    InvalidRedirectUriError.__init__!   rC   r   r>   NrD   r5   s   @r   rG   rG       rE   r   rG   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]! RR	R
RRRR7      ]V 3R lR l4       4       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)   code
client_urilogo_uritos_uri
policy_urijwks_urir   r   c                &   < V ^8  d   QhRS[ RS[ /# )r   r   r   )object)r   r   s   "r   r    OAuthClientMetadata.__annotate__S   s      6 f r   c                    VR 8X  d   R# V# ) Nr+   r!   s   &&r   "_empty_string_optional_url_to_none6OAuthClientMetadata._empty_string_optional_url_to_noneJ   s     7r   c                R   < V ^8  d   QhRS[ R,          RS[S[ ,          R,          /# )r   requested_scopeNr   )r   list)r   r   s   "r   r   rY   \   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(   r7   )r@   r_   requested_scopesallowed_scopesr(   s   &&   r   validate_scope"OAuthClientMetadata.validate_scope\   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   rY   f   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_urisrG   len)r@   ri   s   &&r   validate_redirect_uri)OAuthClientMetadata.validate_redirect_urif   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   Nrk   token_endpoint_auth_methodgrant_typesresponse_typesr(   client_namerR   rS   contactsrT   rU   rV   jwkssoftware_idsoftware_version)noneclient_secret_postclient_secret_basicprivate_key_jwt)rP   r)   z+urn:ietf:params:oauth:grant-type:jwt-bearer)r`   r   r   r   r   r   )r   r   s   "r   r   rY   %   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/   r0   r   rk   rp   rq   rr   r(   rs   rR   rS   rt   rT   rU   rV   ru   rv   rw   r	   r1   r\   rf   rm   r2   r3   r4   r5   s   @r   rM   rM   %   s      */sq)AM 	  		  "(NE #K$(J"&H!%H!%G$(J"&HD"K#'     	u 	uC  r   rM   c                   @   a  ] tR t^rt 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__r   sI      Tz   :$  t*  "Dj/ r   r+   )r,   r-   r.   r/   r0   r   r   r   r   r2   r3   r4   r5   s   @r   r}   r}   r   s)     
 !I $M&*+/  r   r}   c                   ~   a  ] tR t^~t 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
NrQ   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   r`   r   bool)r   r   s   "r   r   OAuthMetadata.__annotate__~   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/   r0   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r2   r3   r4   r5   s   @r   r   r   ~   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
.rN   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_serversNrV   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/   r0   r   r   rV   r   r   r   r   r   r   r   r   r   r   r   r2   r3   r4   r5   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   	Exceptionr7   rG   rM   r}   r   r   r+   r   r   <module>r      sh     J J *	 
i 
Ju) JuZ	0!4 	0>I ><:	 :r   