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

Link to this function

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.

Link to this function

delete_user_logins(user_data)

@spec delete_user_logins(any()) :: :ok

Deletes the sessions for all logged in users.

Link to this function

get_user_data(arg)

Gets the user data for the given credentials

Link to this function

put_credentials(arg)

@spec put_credentials({Coherence.CredentialStore.Types.credentials(), any(), atom()}) ::
  :ok

Puts the user_data for the given credentials.

Link to this function

start_link(args)

@spec start_link(any()) :: {:ok, pid()} | {:error, atom()}

Starts a new credentials store.