Encrypt passwords in DB (#1187)
* Encode/Encrypt passwords in DB * Only decrypts passwords if it is necessary * Add tests for encryption functions
This commit is contained in:
@@ -49,6 +49,10 @@ func (u *MockedUserRepo) FindByUsername(username string) (*model.User, error) {
|
||||
return usr, nil
|
||||
}
|
||||
|
||||
func (u *MockedUserRepo) FindByUsernameWithPassword(username string) (*model.User, error) {
|
||||
return u.FindByUsername(username)
|
||||
}
|
||||
|
||||
func (u *MockedUserRepo) UpdateLastLoginAt(id string) error {
|
||||
return u.Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user