Skip to content

Commit 6868f05

Browse files
authored
2fa: log error on totp mismatch (#10734)
Addresses #9515 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent f99942c commit 6868f05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/user-two-factor-authenticators/totp/src/main/java/org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public void check2FA(String code, UserAccount userAccount) throws CloudTwoFactor
5454
logger.info("2FA matches user's input");
5555
return;
5656
}
57-
throw new CloudTwoFactorAuthenticationException("two-factor authentication code provided is invalid");
57+
String msg = "two-factor authentication code provided is invalid";
58+
logger.error(msg);
59+
throw new CloudTwoFactorAuthenticationException(msg);
5860
}
5961

6062
private String get2FAKey(UserAccount userAccount) {

0 commit comments

Comments
 (0)