PlugDeviseSession v0.9.1 PlugDeviseSession.Helpers View Source
Helpers that assist in working with session fetched via PlugDeviseSession
plug.
Link to this section Summary
Functions
Removes user auth data, optionally from a specified scope.
Returns currently logged-in user's id and auth salt, optionally in specified scope.
get_user_id(conn, scope \\ :user)
deprecated
Returns currently logged-in user's identifier, optionally in specified scope.
Puts session id.
Puts user's id and auth salt, optionally in specified scope.
Link to this section Types
Link to this section Functions
Link to this function
delete_user_auth_data(conn, scope \\ :user)
View Sourcedelete_user_auth_data(Plug.Conn.t(), scope()) :: Plug.Conn.t()
Removes user auth data, optionally from a specified scope.
Link to this function
get_user_auth_data(conn, scope \\ :user)
View Sourceget_user_auth_data(Plug.Conn.t(), scope()) :: {id(), salt()} | nil
Returns currently logged-in user's id and auth salt, optionally in specified scope.
Link to this function
get_user_id(conn, scope \\ :user)
View Sourceget_user_id(Plug.Conn.t(), scope()) :: id() | nil
This function is deprecated. Use get_user_auth_data/2 instead.
Returns currently logged-in user's identifier, optionally in specified scope.
Link to this function
put_session_id(conn, length)
View Sourceput_session_id(Plug.Conn.t(), integer()) :: Plug.Conn.t()
Puts session id.
Link to this function
put_user_auth_data(conn, id, auth_salt, scope \\ :user)
View Sourceput_user_auth_data(Plug.Conn.t(), id(), salt(), scope()) :: Plug.Conn.t()
Puts user's id and auth salt, optionally in specified scope.