@Override public boolean restoreRequest() { HttpSession session = getSession(false); if (session == null) return false; SavedRequest.tryRestoreRequest(exchange, session); return false; }
protected RequestAuthenticator createRequestAuthenticator(KeycloakDeployment deployment, HttpServerExchange exchange, SecurityContext securityContext, UndertowHttpFacade facade) { int confidentialPort = getConfidentilPort(exchange); AdapterTokenStore tokenStore = getTokenStore(exchange, facade, deployment, securityContext); return new ServletRequestAuthenticator(facade, deployment, confidentialPort, securityContext, exchange, tokenStore); }
@Override public HttpHandler wrap(HttpHandler handler) { return new UndertowAuthenticatedActionsHandler(deploymentContext, handler); } }
protected AdapterTokenStore getTokenStore(HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, SecurityContext securityContext) { if (deployment.getTokenStore() == TokenStore.SESSION) { return new UndertowSessionTokenStore(exchange, deployment, userSessionManagement, securityContext); } else { return new UndertowCookieTokenStore(facade, deployment, securityContext); } }
@Override protected AdapterTokenStore getTokenStore(HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, SecurityContext securityContext) { if (deployment.getTokenStore() == TokenStore.SESSION) { return new ServletSessionTokenStore(exchange, deployment, sessionManagement, securityContext); } else { return new UndertowCookieTokenStore(facade, deployment, securityContext); } }
@Override protected String changeHttpSessionId(boolean create) { if (!deployment.isTurnOffChangeSessionIdOnLogin()) return ChangeSessionId.changeSessionId(exchange, create); else return getHttpSessionId(create); }
@Override protected KeycloakUndertowAccount createAccount(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal) { return new KeycloakUndertowAccount(principal); } }
@Override public UndertowHttpFacade createFacade(HttpServerExchange exchange) { return new OIDCServletUndertowHttpFacade(exchange); } }
@Override public InputStream getInputStream() { return getInputStream(false); }
protected Integer servePage(final HttpServerExchange exchange, final String location) { sendRedirect(exchange, location); return StatusCodes.TEMPORARY_REDIRECT; }
@Override public Request getRequest() { return new RequestFacade(); } }
@Override public void saveRequest() { SavedRequest.trySaveRequest(exchange); }
protected RequestAuthenticator createRequestAuthenticator(KeycloakDeployment deployment, HttpServerExchange exchange, SecurityContext securityContext, UndertowHttpFacade facade) { int confidentialPort = getConfidentilPort(exchange); AdapterTokenStore tokenStore = getTokenStore(exchange, facade, deployment, securityContext); return new ServletRequestAuthenticator(facade, deployment, confidentialPort, securityContext, exchange, tokenStore); }
protected AdapterTokenStore getTokenStore(HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, SecurityContext securityContext) { if (deployment.getTokenStore() == TokenStore.SESSION) { return new UndertowSessionTokenStore(exchange, deployment, sessionManagement, securityContext); } else { return new UndertowCookieTokenStore(facade, deployment, securityContext); } }
@Override protected String changeHttpSessionId(boolean create) { if (!deployment.isTurnOffChangeSessionIdOnLogin()) return ChangeSessionId.changeSessionId(exchange, create); else return getHttpSessionId(create); }
@Override protected KeycloakUndertowAccount createAccount(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal) { return new KeycloakUndertowAccount(principal); } }
@Override public boolean restoreRequest() { HttpSession session = getSession(false); if (session == null) return false; SavedRequest.tryRestoreRequest(exchange, session); return false; }
@Override public UndertowHttpFacade createFacade(HttpServerExchange exchange) { return new OIDCServletUndertowHttpFacade(exchange); } }
@Override public InputStream getInputStream() { return getInputStream(false); }
@Override protected KeycloakUndertowAccount createAccount(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal) { return new KeycloakUndertowAccount(principal); }