Source code for arxiv.users.auth.exceptions

"""Authn/z-related exceptions raised by components in this module."""


[docs]class InvalidToken(ValueError): """Token in request is not valid."""
[docs]class MissingToken(ValueError): """No token found in request."""
[docs]class ConfigurationError(RuntimeError): """The application is not configured correctly."""
[docs]class SessionCreationFailed(RuntimeError): """Failed to create a session in the session store."""
[docs]class SessionDeletionFailed(RuntimeError): """Failed to delete a session in the session store."""
[docs]class UnknownSession(RuntimeError): """Failed to locate a session in the session store."""
[docs]class ExpiredToken(RuntimeError): """An expired token was passed."""