Ë
    ®~h¶  ã                   óB   — d Z ddlmZ ddlmZ ddlmZ  G d„ de«      Zy)	z{authlib.oauth2.rfc6750.validator.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Validate Bearer Token for in request, scope and token.
é   )ÚTokenValidatoré   )ÚInsufficientScopeError)ÚInvalidTokenErrorc                   ó   — e Zd ZdZd„ Zd„ Zy)ÚBearerTokenValidatorÚbearerc                 ó   — t        «       ‚)a_  A method to query token from database with the given token string.
        Developers MUST re-implement this method. For instance::

            def authenticate_token(self, token_string):
                return get_token_from_database(token_string)

        :param token_string: A string to represent the access_token.
        :return: token
        )ÚNotImplementedError)ÚselfÚtoken_strings     ú\/opt/mcp/mcp-sentiment/venv/lib/python3.12/site-packages/authlib/oauth2/rfc6750/validator.pyÚauthenticate_tokenz'BearerTokenValidator.authenticate_token   s   € ô "Ó#Ð#ó    c                 ób  — |s!t        | j                  | j                  ¬«      ‚|j                  «       r!t        | j                  | j                  ¬«      ‚|j	                  «       r!t        | j                  | j                  ¬«      ‚| j                  |j                  «       |«      r
t        «       ‚y)z:Check if token is active and matches the requested scopes.)ÚrealmÚextra_attributesN)r   r   r   Ú
is_expiredÚ
is_revokedÚscope_insufficientÚ	get_scoper   )r   ÚtokenÚscopesÚrequests       r   Úvalidate_tokenz#BearerTokenValidator.validate_token   sœ   € áÜ#Ø—j‘j°4×3HÑ3Hôð ð ×ÑÔÜ#Ø—j‘j°4×3HÑ3Hôð ð ×ÑÔÜ#Ø—j‘j°4×3HÑ3Hôð ð ×"Ñ" 5§?¡?Ó#4°fÔ=Ü(Ó*Ð*ð >r   N)Ú__name__Ú
__module__Ú__qualname__Ú
TOKEN_TYPEr   r   © r   r   r   r      s   „ Ø€Jò
$ó+r   r   N)Ú__doc__Úrfc6749r   Úerrorsr   r   r   r    r   r   ú<module>r$      s!   ðñõ %Ý *Ý %ô+˜>õ +r   