Rivet.Ident.Factor.Lib (rivet_ident v3.5.0)
View SourceSummary
Functions
Preload factors for a related model, with criteria, and only unexpired factors
set a password
iex> strong_password("<KO)(IJM,ko09ijm") :ok iex> strong_password("boo")
Types
@type auth_result() :: {:ok | :error, Rivet.Auth.Domain.t()}
@type ecto_p_result() :: {:ok | :error, Ecto.Changeset.t()}
@type log_msg() :: str()
@type model_p_result() :: {:ok, Rivet.Ident.Factor.t()}
@type str() :: String.t()
@type usr_msg() :: str()
Functions
Preload factors for a related model, with criteria, and only unexpired factors
Ident.Factor.Lib.preloaded_with(model, type)
@spec set_factor(user :: Rivet.Ident.User.t(), fedid :: Rivet.Ident.Factor.FedId.t()) :: {:ok, Rivet.Ident.Factor.t()} | {:error, Ecto.Changeset.t()}
set a password
Future change:
change Ident.Factors so there is an archive state, some types when being cleaned are archived instead of deleted (such as passwords).
Then Auth.Signin.Local.load_password_factor should filter on !archived
iex> strong_password("<KO)(IJM,ko09ijm") :ok iex> strong_password("boo")
iex> strong_password("<ko)(ijm,ko09ijm")
iex> strong_password("KOIJMko09ijm")
iex> strong_password("<KO)(IJM,koijm")
iex> strong_password("<)(,)(*&^%$#@><")