Skip to content

FastJWT Exception

AccessTokenRequiredError

Bases: TokenTypeError

Exception raised when an access token is missing from request

Source code in fastjwt/exceptions.py
class AccessTokenRequiredError(TokenTypeError):
    """Exception raised when an `access` token is missing from request"""

    pass

BadConfigurationError

Bases: FastJWTException

Exception raised when FastJWT configuration contains wrong parameters

Source code in fastjwt/exceptions.py
class BadConfigurationError(FastJWTException):
    """Exception raised when FastJWT configuration contains wrong parameters"""

    pass

CSRFError

Bases: FastJWTException

Exception raised when CSRF protection failed

Source code in fastjwt/exceptions.py
class CSRFError(FastJWTException):
    """Exception raised when CSRF protection failed"""

    pass

FastJWTException

Bases: Exception

Base FastJWT Exception

Source code in fastjwt/exceptions.py
1
2
3
4
class FastJWTException(Exception):
    """Base FastJWT Exception"""

    pass

FreshTokenRequiredError

Bases: TokenError

Exception raised when a not fresh token was used in request

Source code in fastjwt/exceptions.py
class FreshTokenRequiredError(TokenError):
    """Exception raised when a not fresh token was used in request"""

    pass

JWTDecodeError

Bases: FastJWTException

Exception raised when decoding JSON Web Token fails

Source code in fastjwt/exceptions.py
class JWTDecodeError(FastJWTException):
    """Exception raised when decoding JSON Web Token fails"""

    pass

MissingCSRFTokenError

Bases: MissingTokenError

Exception raised when no CSRF token can be parsed from request

Source code in fastjwt/exceptions.py
class MissingCSRFTokenError(MissingTokenError):
    """Exception raised when no CSRF token can be parsed from request"""

    pass

MissingTokenError

Bases: TokenError

Exception raised when no token can be parsed from request

Source code in fastjwt/exceptions.py
class MissingTokenError(TokenError):
    """Exception raised when no token can be parsed from request"""

    pass

NoAuthorizationError

Bases: FastJWTException

Exception raised when no token can be parsed from request

Source code in fastjwt/exceptions.py
class NoAuthorizationError(FastJWTException):
    """Exception raised when no token can be parsed from request"""

    pass

RefreshTokenRequiredError

Bases: TokenTypeError

Exception raised when an refresh token is missing from request

Source code in fastjwt/exceptions.py
class RefreshTokenRequiredError(TokenTypeError):
    """Exception raised when an `refresh` token is missing from request"""

    pass

RevokedTokenError

Bases: TokenError

Exception raised when a revoked token has been used

Source code in fastjwt/exceptions.py
class RevokedTokenError(TokenError):
    """Exception raised when a revoked token has been used"""

    pass

TokenError

Bases: FastJWTException

Base Exception for token related errors

Source code in fastjwt/exceptions.py
class TokenError(FastJWTException):
    """Base Exception for token related errors"""

    pass

TokenRequiredError

Bases: TokenError

Exception raised when no token was used in request

Source code in fastjwt/exceptions.py
class TokenRequiredError(TokenError):
    """Exception raised when no token was used in request"""

    pass

TokenTypeError

Bases: TokenError

Exception raised when a specific token type is expected

Source code in fastjwt/exceptions.py
class TokenTypeError(TokenError):
    """Exception raised when a specific token type is expected"""

    pass