Atex.OAuth.SessionStore.ETS (atex v0.7.1)
View SourceIn-memory, ETS implementation for Atex.OAuth.SessionStore.
This is moreso intended for testing or some occasion where you want the
session store to be volatile for some reason. It's recommended you use
Atex.OAuth.SessionStore.DETS for single-node production deployments.
Summary
Functions
Returns a specification to start this module under a supervisor.
Delete a session from the ETS table.
Retrieve a session from the ETS table.
Insert a session into the ETS table.
Update a session in the ETS table.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec delete(String.t()) :: :ok | :error | :noop
Delete a session from the ETS table.
Returns :ok if deleted, :noop if the session didn't exist.
@spec get(String.t()) :: {:ok, Atex.OAuth.Session.t()} | {:error, atom()}
Retrieve a session from the ETS table.
Returns {:ok, session} if found, {:error, :not_found} otherwise.
@spec insert(String.t(), Atex.OAuth.Session.t()) :: :ok | {:error, atom()}
Insert a session into the ETS table.
Returns :ok on success, {:error, :ets} if an unexpected error occurs.
@spec update(String.t(), Atex.OAuth.Session.t()) :: :ok | {:error, atom()}
Update a session in the ETS table.
In ETS, this is the same as insert - it replaces the existing entry.