WebSession provides a name/value map associated with a specific browser "connection" to the web server. Any values stored in a WebSession must be serializable. Get the current WebSession via WebReq.session
.
See docLib::Web
Slots
- deleteSource
-
Void delete()
Delete this web session which clears both the user agent cookie and the server side session instance. This method must be called before the WebRes is committed - if not the server side instance is cleared, but the user agent cookie will remain uncleared.
- getSource
-
Obj? get(Str name, Obj? def := null)
Convenience for
map.get(name, def)
. - idSource
-
const Str id
Get the unique id used to identify this session.
-
internal Bool isDeleted := false
-
internal Duration lastAccess
-
new make(Str? id := null)
Internal make
- mapSource
-
readonly Str:Obj? map := [Str:Obj][:]
Application name/value pairs which are persisted between HTTP requests. The values stored in this map must be serializable.
- setSource
-
Convenience for
map.set(name, val)
. - toStrSource
-
override Str toStr()
Overrides sys::Obj.toStr
Return id.