arxiv.users.legacy.cookies module¶
Provides functions for working with legacy session cookies.
Generate a value for the classic session cookie.
Parameters: Returns: Signed session cookie value.
Return type: Return type:
Unpack the legacy session cookie.
Parameters: cookie (str) – The value of session cookie. Returns: - str – The session ID associated with the cookie.
- str – The user ID of the authenticated account.
- str – The IP address of the client when the session was created.
- datetime – The datetime when the session was created.
- datetime – The datetime when the session expires.
- str – Legacy user privilege level.
Raises: InvalidCookie
– Raised if the cookie is detectably malformed or tampered with.Return type: Tuple
[str
,str
,str
,datetime
,str
]