Pow v0.1.0-alpha.6 Pow.Store.CredentialsCache View Source
Default module for credentials session storage.
A key (session id), is used to store, fetch or delete credentials. When credentials are stored or deleted, a credentials key will be generated. The value of that key will be all current keys (session ids), and the most recent credentials.
When a key is updated, all expired keys will be pruned from the credentials key.
Link to this section Summary
Functions
Callback implementation for Pow.Store.Base.delete/2
Delete the sesison id from the backend store
Callback implementation for Pow.Store.Base.get/2
Fetch user credentials from the backend store from session id
Callback implementation for Pow.Store.Base.put/3
Add user credentials with the session id to the backend store
List all existing sessions for the user fetched from the backend store
Link to this section Functions
Callback implementation for Pow.Store.Base.delete/2
.
delete(Pow.Config.t(), Pow.Config.t(), binary()) :: :ok
Delete the sesison id from the backend store.
This will delete the sesison id from the session list for the user credentials in the backend store. If the session id is the only one in the session list, the user credentials will be deleted too from the backend store.
get(Pow.Config.t(), binary()) :: any() | :not_found
Callback implementation for Pow.Store.Base.get/2
.
get(Pow.Config.t(), Pow.Config.t(), binary()) :: any() | :not_found
Fetch user credentials from the backend store from session id.
put(Pow.Config.t(), binary(), any()) :: :ok
Callback implementation for Pow.Store.Base.put/3
.
put(Pow.Config.t(), Pow.Config.t(), binary(), any()) :: :ok
Add user credentials with the session id to the backend store.
This will either create or update the current user credentials in the backend store. The session id will be appended to the session list for the user credentials.
sessions(Pow.Config.t(), Pow.Config.t(), map()) :: [binary()]
List all existing sessions for the user fetched from the backend store.