Aino.Session (aino v0.6.0)
Session storage
Link to this section Summary
Functions
Put a session configuration into the token
Decode session data from the token
Encode session data from the token
Link to this section Functions
Link to this function
config(token, config)
Put a session configuration into the token
Used for decode/1
and encode/1
. The configuration should be an implementation
of Aino.Session.Storage
.
The following keys will be added to the token [:session_config]
iex> config = %Session.Cookie{key: "key", salt: "salt"}
iex> token = %{}
iex> token = Session.config(token, config)
iex> token.session_config == config
true
Link to this function
decode(token)
Decode session data from the token
Can only be used with Aino.Session.config/2
having run before.
The following keys will be added to the token [:session]
Link to this function
encode(token)
Encode session data from the token
Can only be used with Aino.Middleware.cookies/1
and Aino.Session.config/2
having run before.