mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11830 from tb365/bugfix/tb-bugfix-080601
fix(apigateway): totp passcode verify error code fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user