SealSkin
Server Referencerouters

sessions

Session management for users plus the session proxy entry point.

attributelogger
= logging.getLogger(__name__)
attributerouter
= APIRouter(prefix='/api/sessions', dependencies=[Depends(verify_token)], route_class=EncryptedRoute)
attributeproxy_router
= APIRouter()
funcsession_info(session_id, data, for_owner=True) -> ActiveSessionInfo

Build the session summary returned to clients.

paramsession_idstr

Session id.

paramdatadict[str, Any]

Session record.

paramfor_ownerbool
= True

Use the collaboration controller URL for room sessions.

Returns

app.models.ActiveSessionInfo

The ActiveSessionInfo.

funcget_my_sessions(user=Depends(verify_token)) -> list[ActiveSessionInfo]

List the calling user's sessions, newest first.

paramuserdict[str, Any]
= Depends(verify_token)

Returns

list[app.models.ActiveSessionInfo]
funcstop_my_session(session_id, user=Depends(verify_token)) -> Response

Stop one of the calling user's sessions.

paramsession_idstr
paramuserdict[str, Any]
= Depends(verify_token)

Returns

fastapi.Response
funcsend_file_to_session(session_id, decrypted_body=Depends(get_decrypted_request_body), user=Depends(verify_token)) -> dict[str, str]

Place an uploaded file into a running session's files directory.

paramsession_idstr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)
paramuserdict[str, Any]
= Depends(verify_token)

Returns

dict[str, str]
funcinitial_session_auth(session_id, request) -> Response

Exchange the one-time access token for the session cookie and redirect.

paramsession_iduuid.UUID
paramrequestRequest

Returns

fastapi.Response