arxiv.users.legacy.authenticate module¶
Provide an API for user authentication using the legacy database.
-
arxiv.users.legacy.authenticate.
authenticate
(username_or_email=None, password=None, token=None)[source]¶ Validate username/password. If successful, retrieve user details.
Parameters: - username_or_email (str) – Users may log in with either their username or their email address.
- password (str) – Password (as entered). Danger, Will Robinson!
- token (str) – Alternatively, the user may provide a bearer token. This is currently used to support “permanent” sessions, in which the token is used to “automatically” log the user in (i.e. without entering credentials).
Returns: domain.User
domain.Authorizations
Raises: AuthenticationFailed
– Failed to authenticate user with provided credentials.Return type: Tuple
[User
,Authorizations
]