Example
@session_config Raxx.Session.config(
key: "my_session",
store: Raxx.Session.SignedCookie,
secret_key_base: String.duplicate("squirrel", 8),
salt: "epsom"
)
# Or configure at runtime and pass as state argument to server.
def handle_request(request, _state) do
{:ok, session} = Raxx.Session.fetch(request, @session_config)
# ... processing
response(:ok)
|> Raxx.Session.put(updated_session, @session_config)
# ... something went wrong
response(:forbiddent)
|> Raxx.Session.drop(@session_config)
end
Plug compatibility.
By using the SignedCookie
store your sessions are compatible with verified plug sessions.
I am looking for help to port the encrypted plug sessions to this library and create a second store for EncryptedCookie
hopefully I will be able to announce that below soon’