216 event.detail(Details.CODE_ID,
authSession.getParentSession().getId());
218 if (client == null) {
219 event.error(Errors.CLIENT_NOT_FOUND);
225 event.client(client);
226 session.getContext().setClient(client);
228 if (!client.isEnabled()) {
229 event.error(Errors.CLIENT_DISABLED);
238 String lastExecFromSession =
authSession.getAuthNote(AuthenticationProcessor.CURRENT_AUTHENTICATION_EXECUTION);
239 String lastFlow =
authSession.getAuthNote(AuthenticationProcessor.CURRENT_FLOW_PATH);
243 logger.debugf(
"Transition between flows! Current flow: %s, Previous flow: %s",
flowPath, lastFlow);
246 if (AuthenticationSessionModel.Action.AUTHENTICATE.name().equals(
authSession.getAction())) {
248 authSession.removeAuthNote(AuthenticationProcessor.CURRENT_AUTHENTICATION_EXECUTION);
249 lastExecFromSession = null;
259 if (
execution == null && lastExecFromSession != null) {
260 logger.debugf(
"Parameter 'execution' is not in the request, but flow wasn't changed. Will update browser history");
261 request.setAttribute(BrowserHistoryHelper.SHOULD_UPDATE_BROWSER_HISTORY,
true);
270 ClientSessionCode.ParseResult<AuthenticationSessionModel> result = ClientSessionCode.parseResult(
code,
tabId, session, realm, client,
event,
authSession);
275 if (ObjectUtil.isEqualOrBothNull(
execution,
authSession.getAuthNote(AuthenticationProcessor.CURRENT_AUTHENTICATION_EXECUTION))) {
276 String latestFlowPath =
authSession.getAuthNote(AuthenticationProcessor.CURRENT_FLOW_PATH);
279 logger.debugf(
"Invalid action code, but execution matches. So just redirecting to %s", redirectUri);
280 authSession.setAuthNote(LoginActionsService.FORWARDED_ERROR_MESSAGE_NOTE, Messages.EXPIRED_ACTION);
281 response = Response.status(Response.Status.FOUND).location(redirectUri).build();
289 actionRequest =
true;
AuthenticationSessionModel initialVerifyAuthSession()
Definition: SessionCodeChecks.java:131
final HttpRequest request
Definition: SessionCodeChecks.java:68
void removeExpiredClientSession()
Definition: ClientSessionCode.java:190
final String code
Definition: SessionCodeChecks.java:73
final RealmModel realm
Definition: SessionCodeChecks.java:66
boolean actionRequest
Definition: SessionCodeChecks.java:64
final KeycloakSession session
Definition: SessionCodeChecks.java:70
URI getLastExecutionUrl(String flowPath, String executionId, String tabId)
Definition: SessionCodeChecks.java:423
final String execution
Definition: SessionCodeChecks.java:74
final EventBuilder event
Definition: SessionCodeChecks.java:71
ClientSessionCode< AuthenticationSessionModel > clientCode
Definition: SessionCodeChecks.java:62
Response showPageExpired(AuthenticationSessionModel authSession)
Definition: SessionCodeChecks.java:429
Response response
Definition: SessionCodeChecks.java:63
final String flowPath
Definition: SessionCodeChecks.java:77
AuthenticationSessionModel authSession
Definition: SessionCodeChecks.java:61
final String tabId
Definition: SessionCodeChecks.java:76
static final Logger logger
Definition: SessionCodeChecks.java:59