
    k7iZ
                     V    S SK Jr  S SKJr  S SKJr  SSKJr  SSKJ	r	   " S S\	5      r
g	)
    )ContinueIteration)InvalidTokenError)JWTBearerTokenValidator   )UnsupportedTokenTypeError)RevocationEndpointc                   <   ^  \ rS rSrSrSU 4S jjrS rS rSrU =r	$ )JWTRevocationEndpoint	   a#  JWTRevocationEndpoint inherits from `RFC7009`_
:class:`~authlib.oauth2.rfc7009.RevocationEndpoint`.

The JWT access tokens cannot be revoked.
If the submitted token is a JWT access token, then revocation returns
a `invalid_token_error`.

:param issuer: The issuer identifier.

:param \\*\\*kwargs: Other parameters are inherited from
    :class:`~authlib.oauth2.rfc7009.RevocationEndpoint`.

Plain text access tokens and other kind of tokens such as refresh_tokens
will be ignored by this endpoint and passed to the next revocation endpoint::

    class MyJWTAccessTokenRevocationEndpoint(JWTRevocationEndpoint):
        def get_jwks(self): ...


    # endpoint dedicated to JWT access token revokation
    authorization_server.register_endpoint(
        MyJWTAccessTokenRevocationEndpoint(
            issuer="https://authorization-server.example.org",
        )
    )

    # another endpoint dedicated to refresh token revokation
    authorization_server.register_endpoint(MyRefreshTokenRevocationEndpoint)

.. _RFC7009: https://tools.ietf.org/html/rfc7009
c                 6   > [         TU ]  " USU0UD6  Xl        g )Nserver)super__init__issuer)selfr   r   argskwargs	__class__s        [/home/james-whalen/.local/lib/python3.13/site-packages/authlib/oauth2/rfc9068/revocation.pyr   JWTRevocationEndpoint.__init__*   s    $8v88    c                 L   U R                  X5        UR                  R                  S5      S;  a
  [        5       e[	        U R
                  SS9nU R                  Ul         UR                  UR                  S   5        [        5       e! [         a  n[        5       UeSnAff = f) token_type_hint)access_tokenNN)r   resource_servertoken)
check_paramsformgetr   r   r   get_jwksauthenticate_tokenr   r   )r   requestclient	validatorexcs        r   r"   (JWTRevocationEndpoint.authenticate_token.   s    '* <<-.6LL#%%+4;;PTU	!]]		/((g)>? ())	 ! 	/#%3.	/s   !B	 	
B#BB#c                     [        5       e)zReturn the JWKs that will be used to check the JWT access token signature.
Developers MUST re-implement this method::

    def get_jwks(self):
        return load_jwks("jwks.json")
)NotImplementedError)r   s    r   r!   JWTRevocationEndpoint.get_jwksC   s     "##r   )r   )N)
__name__
__module____qualname____firstlineno____doc__r   r"   r!   __static_attributes____classcell__)r   s   @r   r
   r
   	   s    @**$ $r   r
   N)authlib.common.errorsr   authlib.oauth2.rfc6750.errorsr   &authlib.oauth2.rfc9068.token_validatorr   rfc6749r   rfc7009r   r
    r   r   <module>r8      s#    3 ; J / (A$. A$r   