private void handleErrorResponse(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) throws InvalidCredentialsException { if (isErrorParamExists(request)) { StringBuilder errorMessage = new StringBuilder(); String error_code = request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_ERROR_CODE); String error = request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_ERROR); String error_description = request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_ERROR_DESCRIPTION); String error_reason = request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_ERROR_REASON); errorMessage.append("error_code: ").append(error_code).append(", error: ").append(error) .append(", error_description: ").append(error_description) .append(", error_reason: ").append(error_reason); if (log.isDebugEnabled()) { log.debug("Failed to authenticate via Facebook. " + errorMessage.toString()); } throw new InvalidCredentialsException(errorMessage.toString()); } }
log.debug("A login attempt was failed due to invalid credentials", e); handleFailedAuthentication(request, response, context, authenticatorConfig, e.getUser()); } catch (AuthenticationFailedException e) { IdentityErrorMsgContext errorContext = IdentityUtil.getIdentityErrorMsg();
log.debug("A login attempt was failed due to invalid credentials", e); handleFailedAuthentication(request, response, context, authenticatorConfig, e.getUser()); } catch (AuthenticationFailedException e) { IdentityErrorMsgContext errorContext = IdentityUtil.getIdentityErrorMsg();
MultitenantUtils.getTenantAwareUsername(username), password); if (!isAuthenticated) { throw new InvalidCredentialsException("Authentication Failed", User.getUserFromUserName(username));
MultitenantUtils.getTenantAwareUsername(username), password); if (!isAuthenticated) { throw new InvalidCredentialsException("Authentication Failed", User.getUserFromUserName(username));
"submitted from login page" + username + " does not match."); throw new InvalidCredentialsException("Credential mismatch."); throw new InvalidCredentialsException("User authentication failed due to invalid credentials", User.getUserFromUserName(username));
throw new InvalidCredentialsException("User authentication failed due to invalid credentials", User.getUserFromUserName(username));
throw new InvalidCredentialsException( " User authentication failed due to invalid credentials ", User.getUserFromUserName(userName)); throw new InvalidCredentialsException(" User authentication failed due to " + radiusResponse.getError(), User.getUserFromUserName(userName)); } catch (CasqueException ce) {
return AuthenticatorFlowStatus.SUCCESS_COMPLETED; } else if (radiusResponseType == RadiusResponse.ACCESS_REJECT) { // Authentication Failed. throw new InvalidCredentialsException("User authentication failed due to invalid credentials", User.getUserFromUserName(userName)); throw new InvalidCredentialsException("User authentication failed due to" + radiusResponse.getError(), User.getUserFromUserName(userName)); } catch (CasqueException ce) {