Returns true if the given password is correct for this user, and the account isn't disabled.
(password string)
| 507 | |
| 508 | // Returns true if the given password is correct for this user, and the account isn't disabled. |
| 509 | func (user *userImpl) Authenticate(password string) bool { |
| 510 | ok, _ := user.AuthenticateWithReason(password) |
| 511 | return ok |
| 512 | } |
| 513 | |
| 514 | // AuthenticateWithReason returns true if the user exists, is not disabled, and has a valid password. If authentication fails, a user readable string for logging will be returned. |
| 515 | func (user *userImpl) AuthenticateWithReason(password string) (ok bool, reason string) { |