AuthShield v0.0.4 AuthShield.Resources.Schemas.User View Source
Defines all the user fields and its relations.
The user is a resource and an subject that makes requests to the systems and is used on authentication and authorization request.
We do not save users password, only the encripted hash that will be used to authenticate in password based forms.
Link to this section Summary
Functions
Generates an Ecto.Changeset
struct with the changes.
Generates an Ecto.Changeset
struct with the changes.
Generates an Ecto.Changeset
struct with the changes.
Generates an Ecto.Changeset
struct with the changes.
Generates an Ecto.Changeset
struct with the changes.
Link to this section Types
t()
View Sourcet() :: %AuthShield.Resources.Schemas.User{ __meta__: term(), email: String.t(), first_name: String.t(), id: binary(), inserted_at: NaiveDateTime.t(), is_active: boolean(), last_name: String.t(), locked_until: NaiveDateTime.t(), password_credential: AuthShield.Credentials.Schemas.Password.t(), pin_credential: AuthShield.Credentials.Schemas.PIN.t(), roles: [AuthShield.Resources.Schemas.Role.t()], totp_credential: AuthShield.Credentials.Schemas.TOTP.t(), updated_at: NaiveDateTime.t() }
Abstract user module type.
Link to this section Functions
changeset_insert(model, params)
View Sourcechangeset_insert(model :: t(), params :: map()) :: Ecto.Changeset.t()
Generates an Ecto.Changeset
struct with the changes.
It defines validations and also generates the password hash if necessary.
changeset_locked_until(model, params)
View Sourcechangeset_locked_until(model :: t(), params :: map()) :: Ecto.Changeset.t()
Generates an Ecto.Changeset
struct with the changes.
THIS ONLY ACCEPTS the locked_until
field.
changeset_roles(model, roles)
View Sourcechangeset_roles( model :: t(), roles :: [AuthShield.Resources.Schemas.Role.t()] ) :: Ecto.Changeset.t()
Generates an Ecto.Changeset
struct with the changes.
It changes the related roles list.
changeset_status(model, params)
View Sourcechangeset_status(model :: t(), params :: map()) :: Ecto.Changeset.t()
Generates an Ecto.Changeset
struct with the changes.
THIS ONLY ACCEPTS the is_active
field.
changeset_update(model, params)
View Sourcechangeset_update(model :: t(), params :: map()) :: Ecto.Changeset.t()
Generates an Ecto.Changeset
struct with the changes.
THIS DOES NOT CHANGE THE password
and is_active
.