gws.base.auth.session¶
Authentication session object.
Source code: gws.base.auth.session
Module Contents¶
- class gws.base.auth.session.Object(uid: str, user: gws.User, method: gws.AuthMethod | None, data: dict = None, created: datetime.datetime = None, updated: datetime.datetime = None, is_changed=True, is_transient=False)¶
Bases:
gws.AuthSessionAuthentication session.
- created¶
Creation time.
- data¶
Session data.
- isChanged = True¶
The session data has changed since the session was loaded.
- isTransient = False¶
The session lives only for the duration of the request and is not stored.
- method¶
The method that created the session,
Nonefor the guest session.
- uid¶
Session uid.
- updated¶
Last update time.
- user¶
The session user.
- get(key, default=None)¶
Get a session data value.
- Parameters:
key – Value name.
default – Default value.
- Returns:
The value, or the default if it is not set.
- set(key, val)¶
Set a session data value and mark the session as changed.
- Parameters:
key – Value name.
value – The value.