Common method to handle browser authentication request in protocols unified way.
107 String flowId = flow.getId();
108 AuthenticationProcessor processor =
createProcessor(authSession, flowId, LoginActionsService.AUTHENTICATE_PATH);
109 event.detail(Details.CODE_ID, authSession.getParentSession().getId());
115 if (processor.authenticateOnly() == null) {
118 Response response = protocol.sendError(authSession, Error.PASSIVE_LOGIN_REQUIRED);
122 AuthenticationManager.setClientScopesInSession(authSession);
124 if (processor.nextRequiredAction() != null) {
125 Response response = protocol.sendError(authSession, Error.PASSIVE_INTERACTION_REQUIRED);
130 processor.attachSession();
131 }
catch (Exception e) {
132 return processor.handleBrowserException(e);
134 return processor.finishAuthentication(protocol);
138 if (redirectToAuthentication) {
139 return processor.redirectToFlow();
141 return processor.authenticate();
142 }
catch (Exception e) {
143 return processor.handleBrowserException(e);
ClientConnection clientConnection
Definition: AuthorizationEndpointBase.java:71
AuthenticationFlowModel getAuthenticationFlow(AuthenticationSessionModel authSession)
Definition: AuthorizationEndpointBase.java:148
KeycloakSession session
Definition: AuthorizationEndpointBase.java:69
AuthenticationProcessor createProcessor(AuthenticationSessionModel authSession, String flowId, String flowPath)
Definition: AuthorizationEndpointBase.java:78
RealmModel realm
Definition: AuthorizationEndpointBase.java:60