AuthXException#
authx.exceptions.AuthXException #
Bases: Exception
Base AuthXException Exception.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
The base exception for all AuthX exceptions.
authx.exceptions.BadConfigurationError #
Bases: AuthXException
Exception raised when AuthX configuration contains wrong parameters.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when AuthX configuration contains wrong parameters.
authx.exceptions.JWTDecodeError #
Bases: AuthXException
Exception raised when decoding JSON Web Token fails.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when decoding JSON Web Token fails.
authx.exceptions.NoAuthorizationError #
Bases: AuthXException
Exception raised when no token can be parsed from request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when no token can be parsed from request.
authx.exceptions.CSRFError #
Bases: AuthXException
Exception raised when CSRF protection failed.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when CSRF protection failed.
authx.exceptions.TokenError #
Bases: AuthXException
Base Exception for token related errors.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when token is invalid.
authx.exceptions.MissingTokenError #
Bases: TokenError
Exception raised when no token can be parsed from request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when no token can be parsed from request.
authx.exceptions.MissingCSRFTokenError #
Bases: MissingTokenError
Exception raised when no CSRF token can be parsed from request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when no CSRF token can be parsed from request.
authx.exceptions.TokenTypeError #
Bases: TokenError
Exception raised when a specific token type is expected.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when token type is invalid.
authx.exceptions.LoginTypeMismatchError #
Bases: TokenTypeError
Exception raised when a token belongs to a different login type.
Initialize LoginTypeMismatchError.
| PARAMETER | DESCRIPTION |
|---|---|
expected_type | Login type required by the protected endpoint. TYPE: |
actual_type | Login type found in the token, if it could be determined. TYPE: |
message | Optional custom error message. TYPE: |
login_type | The login_type to set on the base exception. TYPE: |
Source code in authx/exceptions.py
Raised when a token belongs to a different login type than the protected endpoint expects.
authx.exceptions.RevokedTokenError #
Bases: TokenError
Exception raised when a revoked token has been used.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when token is invalid.
authx.exceptions.TokenRequiredError #
Bases: TokenError
Exception raised when no token was used in request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when token is required.
authx.exceptions.FreshTokenRequiredError #
Bases: TokenError
Exception raised when a not fresh token was used in request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when fresh token is required.
authx.exceptions.AccessTokenRequiredError #
Bases: TokenTypeError
Exception raised when an access token is missing from request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when access token is required.
authx.exceptions.RefreshTokenRequiredError #
Bases: TokenTypeError
Exception raised when an refresh token is missing from request.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when refresh token is required.
authx.exceptions.PolicyDeniedError #
Bases: TokenError
Exception raised when a policy evaluation denies access.
Initialize PolicyDeniedError.
| PARAMETER | DESCRIPTION |
|---|---|
reason | Human-readable reason for the denial. TYPE: |
login_type | The login_type to set on the base exception. TYPE: |
Source code in authx/exceptions.py
Raised when policy evaluation denies access.
authx.exceptions.PolicyEvaluationError #
Bases: AuthXException
Exception raised when a policy evaluator cannot be evaluated.
Initialize AuthXException.
| PARAMETER | DESCRIPTION |
|---|---|
*args | Arguments for the exception. TYPE: |
login_type | The login type associated with the exception. TYPE: |
**kwargs | Keyword arguments for the exception. TYPE: |
Source code in authx/exceptions.py
Raised when a policy evaluator cannot be evaluated.
authx.exceptions.InvalidToken #
Bases: Exception
When a token is invalid for all identity providers.
Initialize InvalidToken Exception.
| PARAMETER | DESCRIPTION |
|---|---|
errors | list of errors TYPE: |
Source code in authx/exceptions.py
Raised when token is invalid.