AuthShield v0.0.4 AuthShield.Credentials.Schemas.PIN View Source
PIN (Personal Identification Number) schema model.
We do not save users pin, only the encripted hash that will be used to authenticate.
To see more about how we hash the pin check Argon2.
Link to this section Summary
Functions
Generates an Ecto.Changeset struct with the changes.
Link to this section Types
    
      
      Link to this type
    
    
          
  
  t()
View Sourcet() :: %AuthShield.Credentials.Schemas.PIN{
  __meta__: term(),
  algorithm: String.t(),
  id: binary(),
  inserted_at: NaiveDateTime.t(),
  pin: term(),
  pin_hash: String.t(),
  updated_at: NaiveDateTime.t(),
  user: AuthShield.Resources.Schemas.User.t(),
  user_id: term()
}
      Abstract pin module type.
Link to this section Functions
    
      
      Link to this function
    
    
          
  
  changeset(model, params)
View Sourcechangeset(model :: t(), params :: map()) :: Ecto.Changeset.t()
Generates an Ecto.Changeset struct with the changes.
It defines validations and also generates the pin hash if necessary.