pass v0.3.0 Pass.DataStore.EctoAdapter

Implements the abstract data storage methods that Pass relies on for the Ecto library.

Summary

Functions

Sets the email confirmed field to true for the user with the specfied email

Returns the user with the specified ID or nil if the user can’t be found

Returns a map of the id and password string stored in the database for the specified identity field (eg. username)

Stashes the password reset token so we can prevent replay attacks

Updates the password with the specified value and clears out the password reset token

Returns true if a user with the specified email address and password reset token can be found. Otherwise it returns false

Returns true if the email address referenes a user in the data store, otherwise it returns false

Functions

confirm_email(email)

Sets the email confirmed field to true for the user with the specfied email.

get(id)

Returns the user with the specified ID or nil if the user can’t be found.

get_by_identity(identity)

Returns a map of the id and password string stored in the database for the specified identity field (eg. username).

set_password_reset_token(email, token)

Stashes the password reset token so we can prevent replay attacks

update_password_for(email, password)

Updates the password with the specified value and clears out the password reset token.

vaild_password_reset_token?(email, token)

Returns true if a user with the specified email address and password reset token can be found. Otherwise it returns false.

valid_email?(email)

Returns true if the email address referenes a user in the data store, otherwise it returns false