SessionHeaderPlug v0.1.0 SessionHeaderPlug
A plug to handle session headers and session stores.
The session is accessed via functions on Plug.Conn
. Headers and session have
to be fetched with Plug.Conn.fetch_session/1
before the session can be
accessed.
Session stores
See Plug.Session.Store
for the specification session stores are required to
implement.
Client-side session storage (e.g., Plug.Session.COOKIE
) is inherently
insecure. Consider using SessionServerStore
.
Options
:store
- session store module (required):key
- session header key (required)
Additional options can be given to the session store, see the store’s documentation for the options it accepts.
Examples
plug SessionHeaderPlug, store: SessionServerStore, key: "session-id"
Summary
Types
Functions
Callback implementation for Plug.call/2
.
Callback implementation for Plug.init/1
.