U
    ï¤ùd`	  ã                   @   s´   G d d„ de ƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZ	G dd„ deƒZ
G dd„ deƒZdS )c                   @   s   e Zd ZdZdS )ÚJWTExtendedExceptionz@
    Base except which all flask_jwt_extended errors extend
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úA/tmp/pip-unpacked-wheel-1sqzkeyl/flask_jwt_extended/exceptions.pyr      s   r   c                   @   s   e Zd ZdZdS )ÚJWTDecodeErrorz!
    An error decoding a JWT
    Nr   r   r   r   r   r	   	   s   r	   c                   @   s   e Zd ZdZdS )ÚInvalidHeaderErrorz<
    An error getting header information from a request
    Nr   r   r   r   r   r
      s   r
   c                   @   s   e Zd ZdZdS )ÚInvalidQueryParamErrorzI
    An error when a query string param is not in the correct format
    Nr   r   r   r   r   r      s   r   c                   @   s   e Zd ZdZdS )ÚNoAuthorizationErrorzW
    An error raised when no authorization token was found in a protected endpoint
    Nr   r   r   r   r   r   !   s   r   c                   @   s   e Zd ZdZdS )Ú	CSRFErrorz'
    An error with CSRF protection
    Nr   r   r   r   r   r   )   s   r   c                   @   s   e Zd ZdZdS )ÚWrongTokenErrorze
    Error raised when attempting to use a refresh token to access an endpoint
    or vice versa
    Nr   r   r   r   r   r   1   s   r   c                       s*   e Zd ZdZeeddœ‡ fdd„Z‡  ZS )ÚRevokedTokenErrorzR
    Error raised when a revoked token attempt to access a protected endpoint
    N©Ú
jwt_headerÚjwt_dataÚreturnc                    s   t ƒ  d¡ || _|| _d S )NzToken has been revoked©ÚsuperÚ__init__r   r   )Úselfr   r   ©Ú	__class__r   r   r   ?   s    zRevokedTokenError.__init__©r   r   r   r   Údictr   Ú__classcell__r   r   r   r   r   :   s   r   c                       s*   e Zd ZdZeeddœ‡ fdd„Z‡  ZS )ÚFreshTokenRequiredzt
    Error raised when a valid, non-fresh JWT attempt to access an endpoint
    protected by fresh_jwt_required
    Nr   c                    s   t ƒ  |¡ || _|| _d S ©Nr   ©r   Úmessager   r   r   r   r   r   K   s    zFreshTokenRequired.__init__r   r   r   r   r   r   E   s   r   c                       s*   e Zd ZdZeeddœ‡ fdd„Z‡  ZS )ÚUserLookupErrorz—
    Error raised when a user_lookup callback function returns None, indicating
    that it cannot or will not load a user for the given identity.
    Nr   c                    s   t ƒ  |¡ || _|| _d S r   r   r   r   r   r   r   W   s    zUserLookupError.__init__r   r   r   r   r   r!   Q   s   r!   c                       s*   e Zd ZdZeeddœ‡ fdd„Z‡  ZS )ÚUserClaimsVerificationErrorz
    Error raised when the claims_verification_callback function returns False,
    indicating that the expected user claims are invalid
    Nr   c                    s   t ƒ  |¡ || _|| _d S r   r   r   r   r   r   r   c   s    z$UserClaimsVerificationError.__init__r   r   r   r   r   r"   ]   s   r"   N)Ú	Exceptionr   r	   r
   r   r   r   r   r   r   r!   r"   r   r   r   r   Ú<module>   s   	