Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCryptPasswordHasher ¶
type BCryptPasswordHasher struct{}
func (BCryptPasswordHasher) ComparePasswords ¶
func (BCryptPasswordHasher) ComparePasswords(hash []byte, password string) error
func (BCryptPasswordHasher) HashPassword ¶
func (BCryptPasswordHasher) HashPassword(password string) ([]byte, error)
type ConfigPasswordCriteriaValidator ¶
type ConfigPasswordCriteriaValidator struct{}
func (ConfigPasswordCriteriaValidator) ValidatePasswordCriteria ¶
func (ConfigPasswordCriteriaValidator) ValidatePasswordCriteria(password string) ValidatePasswordCriteriaError
type PasswordCriteriaValidator ¶
type PasswordCriteriaValidator interface { // ValidatePasswordCriteria validates the password meets the minimum complexity criteria. ValidatePasswordCriteria(password string) ValidatePasswordCriteriaError }
type PasswordHasher ¶
type PasswordHasher interface { // HashPassword hashes the passwords and returns the hash and any errors. HashPassword(password string) ([]byte, error) // ComparePasswords compares a password hash and a plain text password. // Returns nil if equal and any other errors. ComparePasswords(hash []byte, password string) error }
type ValidatePasswordCriteriaError ¶
type ValidatePasswordCriteriaError struct { // Status is an int that describes the type of error. Status int // contains filtered or unexported fields }
func CreateValidatePasswordCriteriaError ¶
func CreateValidatePasswordCriteriaError(status int, message string) ValidatePasswordCriteriaError
CreateValidatePasswordCriteriaError creates a ValidatePasswordCriteriaError with the provided status and error message.
func CreateValidatePasswordCriteriaValid ¶
func CreateValidatePasswordCriteriaValid() ValidatePasswordCriteriaError
CreateValidatePasswordCriteriaValid creates a ValidatePasswordCriteriaError with a ValidatePasswordCriteriaValid status and nil err.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.