@Override public void handle(Request req, Response rsp) { WebContext context = req.require(WebContext.class); pac4j.getCallbackLogic() .perform(context, pac4j, pac4j.getHttpActionAdapter(), defaultUrl, multiProfile, renewSession); } }
@Override @SuppressWarnings("unchecked") public void handle(RouteContext routeContext) { Objects.requireNonNull(callbackLogic); Objects.requireNonNull(config); PippoWebContext webContext = new PippoWebContext(routeContext, config.getSessionStore()); callbackLogic.perform(webContext, config, config.getHttpActionAdapter(), defaultUrl, multiProfile, renewSession); }
@Override public void handle(RoutingContext event) { // Can we complete the authentication process here? final VertxWebContext webContext = new VertxWebContext(event, sessionStore); vertx.executeBlocking(future -> { callbackLogic.perform(webContext, config, httpActionHandler, defaultUrl, saveInSession, multiProfile, renewSession, defaultClient); future.complete(null); }, false, asyncResult -> { // If we succeeded we're all good here, the job is done either through approving, or redirect, or // forbidding // However, if an error occurred we need to handle this here if (asyncResult.failed()) { event.fail(new TechnicalException(asyncResult.cause())); } }); }
@Override public void handle(RoutingContext event) { // Can we complete the authentication process here? final VertxWebContext webContext = new VertxWebContext(event, sessionStore); vertx.executeBlocking(future -> { callbackLogic.perform(webContext, config, httpActionHandler, defaultUrl, saveInSession, multiProfile, renewSession, defaultClient); future.complete(null); }, false, asyncResult -> { // If we succeeded we're all good here, the job is done either through approving, or redirect, or // forbidding // However, if an error occurred we need to handle this here if (asyncResult.failed()) { event.fail(new TechnicalException(asyncResult.cause())); } }); }
@RequestMapping("${pac4j.callback.path:/callback}") public void callback(final HttpServletRequest request, final HttpServletResponse response) { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final J2EContext context = new J2EContext(request, response, config.getSessionStore()); callbackLogic.perform(context, config, J2ENopHttpActionAdapter.INSTANCE, this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); }
@Override public void doFilter(final ServletRequest req, final ServletResponse resp, final FilterChain chain) throws IOException, ServletException { assertNotNull("config", this.config); final J2EContext context = new J2EContext((HttpServletRequest) req, (HttpServletResponse) resp, config.getSessionStore()); if (mustApply(context)) { assertNotNull("callbackLogic", this.callbackLogic); callbackLogic.perform(context, this.config, J2ENopHttpActionAdapter.INSTANCE, this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); } else { chain.doFilter(req, resp); } }
@Override public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final HttpServletRequest request = (HttpServletRequest) servletRequest; final HttpServletResponse response = (HttpServletResponse) servletResponse; final SessionStore<J2EContext> sessionStore = config.getSessionStore(); final J2EContext context = new J2EContext(request, response, sessionStore != null ? sessionStore : ShiroSessionStore.INSTANCE); final HttpActionAdapter<Object, J2EContext> adapter = httpActionAdapter != null ? httpActionAdapter : J2ENopHttpActionAdapter.INSTANCE; callbackLogic.perform(context, config, adapter, this.defaultUrl, this.saveInSession, this.multiProfile, false, this.defaultClient); }
@Override public void handleRequest(final HttpServerExchange exchange) { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final UndertowWebContext context = new UndertowWebContext(exchange, config.getSessionStore()); callbackLogic.perform(context, config, UndertowNopHttpActionAdapter.INSTANCE, this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); }
@Override protected void filter(JaxRsContext context) throws IOException { Config config = getConfig(); buildLogic(config).perform(context, config, adapter(config), context.getAbsolutePath(defaultUrl, false), saveInSession, multiProfile, renewSession, defaultClient); }
public CompletionStage<Result> callback() { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final PlayWebContext playWebContext = new PlayWebContext(ctx(), playSessionStore); return CompletableFuture.supplyAsync(() -> callbackLogic.perform(playWebContext, config, config.getHttpActionAdapter(), this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient), ec.current()); }
public CompletionStage<Result> callback() { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final PlayWebContext playWebContext = new PlayWebContext(ctx(), playSessionStore); return CompletableFuture.supplyAsync(() -> callbackLogic.perform(playWebContext, config, config.getHttpActionAdapter(), this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient), ec.current()); }
@Override public Object handle(final Request request, final Response response) throws Exception { assertNotNull("callbackLogic", callbackLogic); assertNotNull("config", config); final SparkWebContext context = new SparkWebContext(request, response, config.getSessionStore()); callbackLogic.perform(context, config, config.getHttpActionAdapter(), this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); return null; }
@Override protected void internalFilter(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) throws IOException, ServletException { assertNotNull("callbackLogic", callbackLogic); final Config config = getConfig(); assertNotNull("config", config); final J2EContext context = new J2EContext(request, response, config.getSessionStore()); retrieveCallbackLogic().perform(context, config, retrieveHttpActionAdapter(), this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); }
@Override protected void internalFilter(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) throws IOException, ServletException { assertNotNull("callbackLogic", callbackLogic); final Config config = getConfig(); assertNotNull("config", config); final JEEContext context = new JEEContext(request, response, config.getSessionStore()); retrieveCallbackLogic().perform(context, config, retrieveHttpActionAdapter(), this.defaultUrl, this.saveInSession, this.multiProfile, this.renewSession, this.defaultClient); }
cookieHandler.handle(rc); executeBlocking(vertx, future -> { callbackLogic.perform(webContext, pac4jConfig, new DefaultHttpActionAdapter(), null, false, false); }, after -> {