arxiv.users.legacy.util module¶
Helpers and Flask application integration.
-
arxiv.users.legacy.util.
check_password
(password, encrypted)[source]¶ Check a password against an encrypted hash.
Return type: None
-
arxiv.users.legacy.util.
compute_capabilities
(tapir_user)[source]¶ Calculate the privilege level code for a user.
Return type: int
-
arxiv.users.legacy.util.
current_session
()[source]¶ Get/create database session for this context.
Return type: Session
-
arxiv.users.legacy.util.
from_epoch
(t)[source]¶ Get a
datetime
from an UNIX timestamp.Return type: datetime
-
arxiv.users.legacy.util.
get_scopes
(db_user)[source]¶ Generate a list of authz scopes for a legacy user based on class.
Return type: List
[str
]
-
arxiv.users.legacy.util.
get_session_duration
()[source]¶ Get the session duration from the config.
Return type: int
-
arxiv.users.legacy.util.
hash_password
(password)[source]¶ Generate a secure hash of a password.
Return type: str
-
arxiv.users.legacy.util.
init_app
(app=None)[source]¶ Set default configuration parameters for an application instance.
Return type: None