sql_membership_provider v0.1.0 SqlMembershipProvider.Membership

Struct for representing a user's membership to an application and their authentication information.

Link to this section Summary

Functions

Fetch a membership by user id.

Check if a plaintext password matches a user's hashed password.

Link to this section Types

Link to this type

t()

t() :: %SqlMembershipProvider.Membership{
  application_id: String.t(),
  comment: String.t() | nil,
  create_date: tuple(),
  email: String.t() | nil,
  failed_password_answer_attempt_count: integer(),
  failed_password_answer_attempt_window_start: tuple(),
  failed_password_attempt_count: integer(),
  failed_password_attempt_window_start: tuple(),
  is_approved: boolean(),
  is_locked_out: boolean(),
  last_lockout_date: tuple(),
  last_login_date: tuple(),
  last_password_changed_date: tuple(),
  lowered_email: String.t() | nil,
  mobile_pin: String.t() | nil,
  password: String.t(),
  password_answer: String.t() | nil,
  password_format: integer(),
  password_question: String.t() | nil,
  password_salt: String.t(),
  user_id: String.t()
}

Link to this section Functions

Link to this function

find_by_user_id(pid, user_id)

find_by_user_id(atom() | pid(), String.t()) ::
  SqlMembershipProvider.Membership.t() | nil

Fetch a membership by user id.

Link to this function

is_password_valid?(membership, password)

is_password_valid?(SqlMembershipProvider.Membership.t(), String.t()) ::
  boolean()

Check if a plaintext password matches a user's hashed password.