SqlMembershipProvider.Membership (sql_membership_provider v0.7.0)
Struct for representing a user's membership to an application and their authentication information.
Link to this section Summary
Functions
Changeset for user registration
Fetch a membership by case insensitive email address and case insensitive application name
Fetch a membership by user id.
Check if a plaintext password matches a user's hashed password.
Changeset for resetting user password. This method has no authentication checks.
Changeset for changing user password authenticated by the current password
Link to this section Types
Specs
t() :: %SqlMembershipProvider.Membership{ __meta__: Ecto.Schema.Metadata.t(), application: Ecto.Schema.belongs_to(SqlMembershipProvider.Application.t()) | nil, application_id: binary() | nil, comment: String.t() | nil, create_date: DateTime.t(), email: String.t() | nil, failed_password_answer_attempt_count: integer(), failed_password_answer_attempt_window_start: DateTime.t(), failed_password_attempt_count: integer(), failed_password_attempt_window_start: DateTime.t(), is_approved: boolean(), is_locked_out: boolean(), last_lockout_date: DateTime.t(), last_login_date: DateTime.t(), last_password_changed_date: DateTime.t(), lowered_email: String.t() | nil, mobile_pin: String.t() | nil, new_password: String.t() | nil, password: String.t(), password_answer: String.t() | nil, password_format: integer(), password_question: String.t() | nil, password_salt: String.t(), plaintext_password: String.t() | nil, user: Ecto.Schema.belongs_to(SqlMembershipProvider.User.t()) | nil, user_id: binary() }
Link to this section Functions
create_changeset(model, params)
Specs
create_changeset(t(), Map.t()) :: Ecto.Changeset.t()
Changeset for user registration
find_by_email(email_address, application_name)
Specs
find_by_email(String.t(), String.t()) :: Ecto.Query.t()
Fetch a membership by case insensitive email address and case insensitive application name
find_by_user_id(user_id)
Specs
find_by_user_id(String.t()) :: Ecto.Query.t()
Fetch a membership by user id.
is_password_valid?(membership, password)
Specs
Check if a plaintext password matches a user's hashed password.
password_reset_changeset(model, params \\ %{})
Specs
password_reset_changeset(t(), Map.t()) :: Ecto.Changeset.t()
Changeset for resetting user password. This method has no authentication checks.
password_update_changeset(model, params \\ %{})
Specs
password_update_changeset(t(), Map.t()) :: Ecto.Changeset.t()
Changeset for changing user password authenticated by the current password