mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Return UAA error to Security Context layer
This commit is contained in:
parent
87ca267b0f
commit
40b6cb0d43
@ -104,10 +104,12 @@ func Login(m models.AuthModel) (*models.User, error) {
|
||||
return nil, nil
|
||||
}
|
||||
user, err := authenticator.Authenticate(m)
|
||||
if user == nil && err == nil {
|
||||
if user == nil {
|
||||
if err == nil {
|
||||
log.Debugf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
|
||||
lock.Lock(m.Principal)
|
||||
time.Sleep(frozenTime)
|
||||
}
|
||||
return user, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user