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()
@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}
@spec maybe_set_remember_2fa(Plug.Conn.t(), Plausible.Auth.User.t(), String.t() | nil) :: Plug.Conn.t()
@spec remember_2fa?(Plug.Conn.t(), Plausible.Auth.User.t()) :: boolean()
@spec remember_2fa_days() :: non_neg_integer()
@spec set_2fa_user(Plug.Conn.t(), Plausible.Auth.User.t()) :: Plug.Conn.t()