Source code for arxiv.users.legacy.exceptions

"""Exceptions for legacy user/session integration."""


[docs]class AuthenticationFailed(RuntimeError): """Failed to authenticate user with provided credentials."""
[docs]class NoSuchUser(RuntimeError): """A reference to a non-existant user was passed."""
[docs]class PasswordAuthenticationFailed(RuntimeError): """An invalid username/password combination were provided."""
[docs]class SessionCreationFailed(RuntimeError): """Failed to create a session in the legacy database."""
[docs]class SessionDeletionFailed(RuntimeError): """Failed to delete a session in the legacy database."""
[docs]class UnknownSession(RuntimeError): """Failed to locate a session in the legacy database."""
[docs]class SessionExpired(RuntimeError): """A reference was made to an expired session."""
[docs]class InvalidCookie(ValueError): """The value of a passed legacy cookie is not valid."""
[docs]class RegistrationFailed(RuntimeError): """Could not create a new user."""