657 if (failure instanceof AuthenticationFlowException) {
658 AuthenticationFlowException e = (AuthenticationFlowException) failure;
660 if (e.getError() == AuthenticationFlowError.INVALID_USER) {
661 ServicesLogger.LOGGER.failedAuthentication(e);
662 event.error(Errors.USER_NOT_FOUND);
663 if (e.getResponse() != null)
return e.getResponse();
665 }
else if (e.getError() == AuthenticationFlowError.USER_DISABLED) {
666 ServicesLogger.LOGGER.failedAuthentication(e);
667 event.error(Errors.USER_DISABLED);
668 if (e.getResponse() != null)
return e.getResponse();
670 }
else if (e.getError() == AuthenticationFlowError.USER_TEMPORARILY_DISABLED) {
671 ServicesLogger.LOGGER.failedAuthentication(e);
672 event.error(Errors.USER_TEMPORARILY_DISABLED);
673 if (e.getResponse() != null)
return e.getResponse();
676 }
else if (e.getError() == AuthenticationFlowError.INVALID_CLIENT_SESSION) {
677 ServicesLogger.LOGGER.failedAuthentication(e);
678 event.error(Errors.INVALID_CODE);
679 if (e.getResponse() != null)
return e.getResponse();
682 }
else if (e.getError() == AuthenticationFlowError.EXPIRED_CODE) {
683 ServicesLogger.LOGGER.failedAuthentication(e);
684 event.error(Errors.EXPIRED_CODE);
685 if (e.getResponse() != null)
return e.getResponse();
688 }
else if (e.getError() == AuthenticationFlowError.FORK_FLOW) {
689 ForkFlowException reset = (ForkFlowException)e;
693 clone.setAction(AuthenticationSessionModel.Action.AUTHENTICATE.name());
698 processor.setAuthenticationSession(clone)
699 .setFlowPath(LoginActionsService.AUTHENTICATE_PATH)
700 .setFlowId(AuthenticationFlowResolver.resolveBrowserFlow(clone).getId())
710 CacheControlUtil.noBackButtonCacheControlHeader();
713 }
else if (e.getError() == AuthenticationFlowError.DISPLAY_NOT_SUPPORTED) {
714 ServicesLogger.LOGGER.failedAuthentication(e);
715 event.error(Errors.DISPLAY_UNSUPPORTED);
716 if (e.getResponse() != null)
return e.getResponse();
719 ServicesLogger.LOGGER.failedAuthentication(e);
720 event.error(Errors.INVALID_USER_CREDENTIALS);
721 if (e.getResponse() != null)
return e.getResponse();
726 ServicesLogger.LOGGER.failedAuthentication(failure);
727 event.error(Errors.INVALID_USER_CREDENTIALS);
KeycloakSession session
Definition: AuthenticationProcessor.java:87
HttpRequest request
Definition: AuthenticationProcessor.java:89
AuthenticationProcessor setSession(KeycloakSession session)
Definition: AuthenticationProcessor.java:184
EventBuilder event
Definition: AuthenticationProcessor.java:88
AuthenticationProcessor setEventBuilder(EventBuilder eventBuilder)
Definition: AuthenticationProcessor.java:189
AuthenticationProcessor setAuthenticationSession(AuthenticationSessionModel authenticationSession)
Definition: AuthenticationProcessor.java:169
Response authenticate()
Definition: AuthenticationProcessor.java:777
AuthenticationProcessor setRequest(HttpRequest request)
Definition: AuthenticationProcessor.java:194
AuthenticationProcessor setBrowserFlow(boolean browserFlow)
Definition: AuthenticationProcessor.java:116
AuthenticationProcessor setRealm(RealmModel realm)
Definition: AuthenticationProcessor.java:164
AuthenticationProcessor()
Definition: AuthenticationProcessor.java:109
boolean isBrowserFlow()
Definition: AuthenticationProcessor.java:112
AuthenticationProcessor setForwardedErrorMessage(FormMessage forwardedErrorMessage)
Definition: AuthenticationProcessor.java:214
< T extends Provider > T getProvider(Class< T > clazz)
ClientConnection connection
Definition: AuthenticationProcessor.java:85
AuthenticationSessionModel authenticationSession
Definition: AuthenticationProcessor.java:84
UriInfo uriInfo
Definition: AuthenticationProcessor.java:86
static AuthenticationSessionModel clone(KeycloakSession session, AuthenticationSessionModel authSession)
Definition: AuthenticationProcessor.java:828
RealmModel realm
Definition: AuthenticationProcessor.java:82
AuthenticationProcessor setForwardedSuccessMessage(FormMessage forwardedSuccessMessage)
Definition: AuthenticationProcessor.java:219
AuthenticationProcessor setUriInfo(UriInfo uriInfo)
Definition: AuthenticationProcessor.java:179
AuthenticationProcessor setConnection(ClientConnection connection)
Definition: AuthenticationProcessor.java:174