MCPcopy Create free account
hub / github.com/53AI/53AIHub / VerifyPassword

Method VerifyPassword

api/model/user.go:352–361  ·  view source on GitHub ↗
(password string)

Source from the content-addressed store, hash-verified

350}
351
352func (user *User) VerifyPassword(password string) error {
353 hashedPassword, err := helper.PasswordHash(password, user.Salt)
354 if err != nil {
355 return err
356 }
357 if hashedPassword != user.Password {
358 return errors.New("username or password is incorrect")
359 }
360 return nil
361}
362
363// GetUserByRelatedId retrieves a user by related ID
364func GetUserByRelatedId(eid int64, relatedId int64) (*User, error) {

Callers 1

LoginFunction · 0.95

Calls 1

NewMethod · 0.45

Tested by

no test coverage detected