Merge pull request #11830 from tb365/bugfix/tb-bugfix-080601

fix(apigateway): totp passcode verify error code fix
This commit is contained in:
Zexi Li
2021-08-06 11:24:11 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ func (t *SAuthToken) VerifyTotpPasscode(s *mcclient.ClientSession, uid, passcode
}
t.updateRetryCount()
return errors.Wrap(httperrors.ErrInvalidCredential, "invalid passcode")
return errors.Wrap(httperrors.ErrInputParameter, "invalid passcode")
}
func SignJWT(t jwt.Token) (string, error) {
+1 -1
View File
@@ -260,7 +260,7 @@ func validatePasscodeHandler(ctx context.Context, w http.ResponseWriter, req *ht
if err != nil {
log.Warningf("VerifyTotpPasscode %s", err.Error())
httperrors.InvalidCredentialError(ctx, w, "invalid passcode: %v", err)
httperrors.InputParameterError(ctx, w, "invalid passcode: %v", err)
return
}