Skip to content

module Athena::PasswordHasher::UserPasswordHasherInterface #

Hashes and verifies the passwords of users, using the APH::Interface configured for them.

Direct including types

Athena::PasswordHasher::UserPasswordHasher

Methods#

abstract #hash_password(user : APH::PasswordAuthenticatedUserInterface, plain_password : String) : String#

Returns the hash of the provided plain_password for the provided user.

View source

abstract #needs_rehash?(user : APH::PasswordAuthenticatedUserInterface) : Bool#

Returns true if the password of the provided user would benefit from being re-hashed, otherwise false.

Always returns false if the user has no password.

View source

abstract #password_valid?(user : APH::PasswordAuthenticatedUserInterface, plain_password : String) : Bool#

Returns true if the provided plain_password matches the password of the provided user, otherwise false.

Always returns false if the user has no password.

View source