-
Notifications
You must be signed in to change notification settings - Fork 22
Plug in API Sessions
Tomas Machalek edited this page Apr 25, 2016
·
2 revisions
Plug-ins / [sessions]
- type: required
- interfaces:
- werkzeug.contrib.sessions.Session
- plugins.abstract.sessions.AbstractSessions
- client-side code: -
- purpose: HTTP session management
The sessions plug-in is expected to handle web sessions where users are identified by a cookie. It is defined to be compatible with Werkzeug's sessions. It means you can take Werkzeug's werkzeug.contrib.sessions.FilesystemSessionStore (see documentation) and it will work with KonText.
# Session.generate_key(salt=None)
Generates a new session key.
# Session.delete(session_id)
Deletes session identified by session_id.
# Session.get(sid)
Loads an existing session from a storage. Returns werkzeug.contrib.Session.
# Session.is_valid_key(key)
Returns True if the key is valid else False
# Session.new()
Creates a new session. Returns werkzeug.contrib.Session
# Session.save(session)
arguments:
- session -- werkzeug.contrib.Session
# Session.save_if_modified(session)
arguments:
- session -- werkzeug.contrib.Session