var ( SqlTableName = "auth_password" SqlCreatePassword = ` CREATE TABLE IF NOT EXISTS ` + SqlTableName + ` ( id TEXT NOT NULL, hash BYTEA NOT NULL, PRIMARY KEY (id, hash) ) ` )
Authenticate returns true if and only if the plain text password given matches the password hash associated with the user. An error is returned if there was a problem finding the user given or if there was an unexpected error comparing the password hashes. If the password does not match, then the error is nil and the bool is false.
Get retrieves the current password hash for the user given.
Set associates the plain text password given with the user that is uniquely identified by id. The password is hashed with bcrypt. If there is a problem with hashing or with storing the password, an error is returned.
This may be called on a new user.