Coherence.CredentialStore.Session (Coherence v0.8.0)
Stores current credential information.
Uses a Server to save logged in credentials.
Note: If you restart the phoenix server, this information is lost, requiring the user to log in again.
If you would like to preserve login status across server restart, you can enable the Rememberable option, or configure the Database cache on the Session plug.
Summary
Functions
Deletes credentials
from the store.
Deletes the sessions for all logged in users.
Gets the user data for the given credentials
Puts the user_data
for the given credentials
.
Starts a new credentials store.
Types
@type t() :: Ecto.Schema.t() | map()
Functions
delete_credentials(credentials)
@spec delete_credentials(Coherence.CredentialStore.Types.credentials()) :: :ok
Deletes credentials
from the store.
Returns the current value of credentials
, if credentials
exists.
delete_user_logins(user_data)
@spec delete_user_logins(any()) :: :ok
Deletes the sessions for all logged in users.
get_user_data(arg)
@spec get_user_data( {Coherence.CredentialStore.Types.credentials(), nil | struct(), integer() | nil} ) :: Coherence.CredentialStore.Types.user_data() | nil
Gets the user data for the given credentials
put_credentials(arg)
@spec put_credentials({Coherence.CredentialStore.Types.credentials(), any(), atom()}) :: :ok
Puts the user_data
for the given credentials
.
start_link(args)
Starts a new credentials store.