Logged authentication failure error message when the errorContext is null
@@ -564,10 +564,14 @@ public class DefaultStepHandler implements StepHandler {
handleFailedAuthentication(request, response, context, authenticatorConfig, e.getUser());
} catch (AuthenticationFailedException e) {
IdentityErrorMsgContext errorContext = IdentityUtil.getIdentityErrorMsg();
- if (errorContext != null && !IdentityCoreConstants.ADMIN_FORCED_USER_PASSWORD_RESET_VIA_OTP_ERROR_CODE.
+ if (errorContext != null) {
+ if (!IdentityCoreConstants.ADMIN_FORCED_USER_PASSWORD_RESET_VIA_OTP_ERROR_CODE.
equals(errorContext.getErrorCode())) {
log.error("Authentication failed exception!", e);
}
+ } else {
+ log.error("Authentication failed exception!", e);
+ }
handleFailedAuthentication(request, response, context, authenticatorConfig, e.getUser());
} catch (LogoutFailedException e) {
throw new FrameworkException(e.getMessage(), e);
