mirror of
https://github.com/openziti/zrok.git
synced 2025-01-08 23:20:04 +01:00
logging (#191)
This commit is contained in:
parent
36067f5e91
commit
471cc4909c
@ -14,11 +14,7 @@ func newResetTokenHandler() *resetTokenHandler {
|
||||
}
|
||||
|
||||
func (handler *resetTokenHandler) Handle(params account.ResetTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||
if params.Body.EmailAddress == "" {
|
||||
logrus.Error("missing email")
|
||||
return account.NewResetTokenNotFound()
|
||||
}
|
||||
logrus.Infof("received token reset request for email '%v'", params.Body.EmailAddress)
|
||||
logrus.Infof("received token regeneration request for email '%v'", principal.Email)
|
||||
|
||||
if params.Body.EmailAddress != principal.Email {
|
||||
logrus.Errorf("mismatched account '%v' for '%v'", params.Body.EmailAddress, principal.Email)
|
||||
@ -61,7 +57,7 @@ func (handler *resetTokenHandler) Handle(params account.ResetTokenParams, princi
|
||||
return account.NewResetTokenInternalServerError()
|
||||
}
|
||||
|
||||
logrus.Infof("reset token for '%v'", a.Email)
|
||||
logrus.Infof("regenerated token '%v' for '%v'", a.Token, a.Email)
|
||||
|
||||
return account.NewResetTokenOK().WithPayload(&account.ResetTokenOKBody{Token: token})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user