
    k7i!                     H    S r SSKJr  SS/r " S S\5      r " S S\5      rg)aH  authlib.rfc6750.errors.
~~~~~~~~~~~~~~~~~~~~~~

OAuth Extensions Error Registration. When a request fails,
the resource server responds using the appropriate HTTP
status code and includes one of the following error codes
in the response.

https://tools.ietf.org/html/rfc6750#section-6.2

:copyright: (c) 2017 by Hsiaoming Yang.
   )OAuth2ErrorInvalidTokenErrorInsufficientScopeErrorc                   R   ^  \ rS rSrSrSrSrSr     S	U 4S jjrU 4S jr	Sr
U =r$ )
r      a(  The access token provided is expired, revoked, malformed, or
invalid for other reasons. The resource SHOULD respond with
the HTTP 401 (Unauthorized) status code.  The client MAY
request a new access token and retry the protected resource
request.

https://tools.ietf.org/html/rfc6750#section-3.1
invalid_tokenzWThe access token provided is expired, revoked, malformed, or invalid for other reasons.i  c                 >   > [         TU ]  XX45        XPl        X`l        g )N)super__init__realmextra_attributes)selfdescriptionuristatus_codestater   r   	__class__s          W/home/james-whalen/.local/lib/python3.13/site-packages/authlib/oauth2/rfc6750/errors.pyr   InvalidTokenError.__init__$   s     	;>
 0    c           	        > [         TU ]  5       n/ nU R                  (       a  UR                  SU R                   S35        U R                  (       a>  UR                  U R                   Vs/ s H  o3 SU R                  U    S3PM     sn5        UR                  SU R                   S35        U R                  5       nUR                  SU S35        UR                  SSSR                  U5      -   45        U$ s  snf )	a_  If the protected resource request does not include authentication
credentials or does not contain an access token that enables access
to the protected resource, the resource server MUST include the HTTP
"WWW-Authenticate" response header field; it MAY include it in
response to other conditions as well.

https://tools.ietf.org/html/rfc6750#section-3
zrealm=""z="zerror="zerror_description="zWWW-AuthenticatezBearer z, )	r
   get_headersr   appendr   extenderrorget_error_descriptionjoin)r   headersextraskerror_descriptionr   s        r   r   InvalidTokenError.get_headers1   s     '%'::MMGDJJ<q12  MM>B>S>ST>S3b..q12!4>ST 	

|1-. 668+,=+>a@A*I		&8I,IJK Us   ,C<)r   r   )NNNNN)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   __static_attributes____classcell__)r   s   @r   r   r      s@     E	(  K 1 r   c                   $    \ rS rSrSrSrSrSrSrg)r   J   a)  The request requires higher privileges than provided by the
access token. The resource server SHOULD respond with the HTTP
403 (Forbidden) status code and MAY include the "scope"
attribute with the scope necessary to access the protected
resource.

https://tools.ietf.org/html/rfc6750#section-3.1
insufficient_scopezIThe request requires higher privileges than provided by the access token.i   N)	r$   r%   r&   r'   r(   r   r   r   r)   r.   r   r   r   r   J   s     !ES  Kr   N)r(   baser   __all__r   r   r.   r   r   <module>r1      s3     8
94 4n[ r   