AuthShield v0.0.1 AuthShield.Credentials View Source

Credentials are means to proof that an identity is valid in authentications.

There are multiple types of credentials and we implements three of them.

  • password (An sequence of digits that only the user known's);
  • pin (An code of 4 or 6 digits that usually are only numbers);
  • totp (An time based code generated in other factor or device);

This module provides an interaface that delegates to the specific credential functions.

Link to this section Summary

Functions

Link to this section Functions

Link to this function

check_password?(password, pass_code)

View Source

See AuthShield.Credentials.Passwords.check_password?/2.

Link to this function

check_pin?(pin, pin_code)

View Source

See AuthShield.Credentials.PIN.check_pin?/2.

Link to this function

check_totp?(totp, totp_code, datetime \\ Timex.now())

View Source

See AuthShield.Credentials.TOTP.check_totp?/3.

See AuthShield.Credentials.Passwords.insert/1.

Link to this function

create_password!(params)

View Source

See AuthShield.Credentials.Passwords.insert!/1.

See AuthShield.Credentials.PIN.insert/1.

See AuthShield.Credentials.PIN.insert!/1.

See AuthShield.Credentials.TOTP.insert/1.

See AuthShield.Credentials.TOTP.insert!/1.

Link to this function

delete_password(password)

View Source

See AuthShield.Credentials.Passwords.delete/1.

Link to this function

delete_password!(password)

View Source

See AuthShield.Credentials.Passwords.delete!/1.

See AuthShield.Credentials.PIN.delete/1.

See AuthShield.Credentials.PIN.delete!/1.

See AuthShield.Credentials.TOTP.delete/1.

See AuthShield.Credentials.TOTP.delete!/1.

Link to this function

get_password_by(filters)

View Source

See AuthShield.Credentials.Passwords.get_by/1.

Link to this function

get_password_by!(filters)

View Source

See AuthShield.Credentials.Passwords.get_by!/1.

See AuthShield.Credentials.PIN.get_by/1.

See AuthShield.Credentials.PIN.get_by!/1.

See AuthShield.Credentials.TOTP.get_by/1.

See AuthShield.Credentials.TOTP.get_by!/1.

Link to this function

list_password(filters \\ [])

View Source

See AuthShield.Credentials.Passwords.list/1.

See AuthShield.Credentials.PIN.list/1.

Link to this function

list_totp(filters \\ [])

View Source

See AuthShield.Credentials.TOTP.list/1.