Coherence v0.5.2 Coherence.CredentialStore.Session

Stores current credential information.

Uses an 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.

Link to this section 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

Link to this section Types

Link to this section Functions

Link to this function delete_credentials(credentials)

Deletes credentials from the store.

Returns the current value of credentials, if credentials exists.

Link to this function delete_user_logins(user_data)
delete_user_logins(any()) :: no_return()

Deletes the sessions for all logged in users.

Link to this function get_user_data(arg)
get_user_data(
  {Coherence.CredentialStore.Types.credentials(), nil | struct(),
   integer() | nil}
) :: any()

Gets the user data for the given credentials

Link to this function put_credentials(arg)
put_credentials({Coherence.CredentialStore.Types.credentials(), any(), atom()}) ::
  any()

Puts the user_data for the given credentials.

Link to this function start_link()
start_link() :: {:ok, pid()} | {:error, atom()}

Starts a new credentials store.