arxiv.users.legacy.sessions module¶
Provides API for legacy user sessions.
-
arxiv.users.legacy.sessions.
create
(authorizations, ip, remote_host, tracking_cookie='', user=None)[source]¶ Create a new legacy session for an authenticated user.
Parameters: Returns: Return type: Return type:
Generate a cookie from a
domain.Session
.Parameters: session ( domain.Session
) –Returns: Return type: str Return type: str
-
arxiv.users.legacy.sessions.
invalidate
(cookie)[source]¶ Invalidate a legacy user session.
Parameters: cookie (str) – Session cookie generated when the session was created. Raises: UnknownSession
– The session could not be found, or the cookie was not valid.Return type: None
-
arxiv.users.legacy.sessions.
invalidate_by_id
(session_id)[source]¶ Invalidate a legacy user session by ID.
Parameters: session_id (str) – Unique identifier for the session. Raises: UnknownSession
– The session could not be found, or the cookie was not valid.Return type: None