View Source PlausibleWeb.TwoFactor.Session (Plausible v0.0.1)

Functions for managing session data related to Two-Factor Authentication.

Summary

Functions

@spec clear_2fa_user(Plug.Conn.t()) :: Plug.Conn.t()
Link to this function

clear_remember_2fa(conn)

View Source
@spec clear_remember_2fa(Plug.Conn.t()) :: Plug.Conn.t()
@spec get_2fa_user(Plug.Conn.t()) ::
  {:ok, Plausible.Auth.User.t()} | {:error, :not_found}
Link to this function

maybe_set_remember_2fa(conn, user, arg3)

View Source
@spec maybe_set_remember_2fa(Plug.Conn.t(), Plausible.Auth.User.t(), String.t() | nil) ::
  Plug.Conn.t()
Link to this function

remember_2fa?(conn, user)

View Source
@spec remember_2fa?(Plug.Conn.t(), Plausible.Auth.User.t()) :: boolean()
@spec remember_2fa_days() :: non_neg_integer()
Link to this function

set_2fa_user(conn, user)

View Source
@spec set_2fa_user(Plug.Conn.t(), Plausible.Auth.User.t()) :: Plug.Conn.t()