lablink_allocator_service.routes.session_cookie¶
lablink_allocator_service.routes.session_cookie
¶
Signing and setting the lablink_session cookie.
Shared by /api/request_vm (student) and the admin peek/connect routes so
the cookie-hardening flags (httponly, samesite, secure) cannot drift apart
across call sites.
Functions:¶
sign_session_cookie_and_redirect(session_id, *, suffix='')
¶
Sign session_id (optionally with a :suffix) into the
lablink_session cookie and redirect to /desktop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_id
|
The session identifier to sign (str or UUID). |
required | |
suffix
|
str
|
Optional payload suffix (e.g. "view_only", "admin_session"). Omitted entirely for a bare student session. |
''
|