View Source Rivet.Ident.Factor.Lib (rivet_ident v2.0.4)

Link to this section Summary

Link to this section 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()

Link to this section Functions

Link to this function

all_not_expired!(user, type)

View Source
Link to this function

clean_password_history(user_id, excluding_id)

View Source
Link to this function

preloaded_with(user, type)

View Source

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()}
Link to this function

set_password(user, password, overrides \\ %{})

View Source

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