MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Authenticate

Method Authenticate

auth/user.go:509–512  ·  view source on GitHub ↗

Returns true if the given password is correct for this user, and the account isn't disabled.

(password string)

Source from the content-addressed store, hash-verified

507
508// Returns true if the given password is correct for this user, and the account isn't disabled.
509func (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.
515func (user *userImpl) AuthenticateWithReason(password string) (ok bool, reason string) {

Callers 2

TestSerializeUserFunction · 0.95

Calls 1

Tested by 2

TestSerializeUserFunction · 0.76