AuthShield v0.0.4 AuthShield.Credentials.Schemas.TOTP View Source
TOTP (Time-based One Time Password) shema model.
We generates a one-time password from sharing a secret key randomly generated that should be known only for us and the client.
To see more about how we generate the qrcode check EQRCode.
Link to this section Summary
Functions
Generates an Ecto.Changeset struct with the changes.
Generates and random string that contains the alphabet letters
and is used as __MODULE__ secret.
Generates and TOTP code from its secret and options
Link to this section Types
    
      
      Link to this type
    
    
          
  
  t()
View Sourcet() :: %AuthShield.Credentials.Schemas.TOTP{
  __meta__: term(),
  digits: integer(),
  email: term(),
  id: binary(),
  inserted_at: NaiveDateTime.t(),
  issuer: String.t(),
  period: integer(),
  qrcode_base64: String.t(),
  secret: String.t(),
  updated_at: NaiveDateTime.t(),
  user: AuthShield.Resources.Schemas.User.t(),
  user_id: term()
}
      Abstract totp 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 secret if necessary.
Generates and random string that contains the alphabet letters
and is used as __MODULE__ secret.
Generates and TOTP code from its secret and options