fix: User login log message fixed when password matches, but user lookup fails
This commit is contained in:
parent
03da2ff2e7
commit
54eb2a6586
|
|
@ -180,8 +180,10 @@ func (api *oliveTinAPI) applyLocalLoginResult(req *apiv1.LocalUserLoginRequest,
|
||||||
SameSite: http.SameSiteLaxMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
}
|
}
|
||||||
response.Header().Set("Set-Cookie", cookie.String())
|
response.Header().Set("Set-Cookie", cookie.String())
|
||||||
|
log.WithFields(log.Fields{"username": user.Username}).Info("LocalUserLogin: User logged in successfully.")
|
||||||
|
} else {
|
||||||
|
log.WithFields(log.Fields{"username": req.Username}).Warn("LocalUserLogin: Password matched but user lookup failed.")
|
||||||
}
|
}
|
||||||
log.WithFields(log.Fields{"username": req.Username}).Info("LocalUserLogin: User logged in successfully.")
|
|
||||||
} else {
|
} else {
|
||||||
log.WithFields(log.Fields{"username": req.Username}).Warn("LocalUserLogin: User login failed.")
|
log.WithFields(log.Fields{"username": req.Username}).Warn("LocalUserLogin: User login failed.")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue