class ISessionStore(Interface): (source)
Known implementations: klein.storage.memory.MemorySessionStore
Backing storage for sessions.
Method | load |
Load a session given the given identifier and security properties. |
Method | new |
Create a new ISession . |
Method | sent |
The transport layer has detected that the given identifiers have been sent over an unauthenticated transport. |
Load a session given the given identifier and security properties.
As an optimization for session stores where the back-end can generate session identifiers when the presented one is not found in the same round-trip to a data store, this method may return a Session
object with an identifier attribute that does not match identifier. However, please keep in mind when implementing ISessionStore
that this behavior is only necessary for requests where authenticatedBy is SessionMechanism.Cookie
; an unauthenticated SessionMechanism.Header
session is from an API client and its session should be valid already.
Parameters | |
identifier:str | Undocumented |
isbool | Undocumented |
authenticatedSessionMechanism | Undocumented |
Returns | |
Deferred firing with ISession or failing with NoSuchSession . | an existing session with the given identifier. |
Create a new ISession
.
Parameters | |
isbool | Undocumented |
authenticatedSessionMechanism | Undocumented |
Returns | |
Deferred firing with ISession . | a new session with a new identifier. |