Package io.undertow.server.session

Examples of io.undertow.server.session.Session.invalidate()


        @Override
        public void invalidate(HttpServerExchange exchange) {
            Session session = this.session.getSessionManager().getSession(exchange, new SimpleSessionConfig(this.session.getId()));
            if (session != null) {
                session.invalidate(exchange);
            }
        }

        @Override
        public String changeSessionId(HttpServerExchange exchange, SessionConfig config) {
View Full Code Here


                SessionConfig sessionConfig = exchange
                        .getAttachment(SessionConfig.ATTACHMENT_KEY);
                Session session = sm.getSession(exchange, sessionConfig);
                if (session == null)
                    session = sm.createSession(exchange, sessionConfig);
                session.invalidate(exchange);

                exchange.setResponseCode(StatusCodes.TEMPORARY_REDIRECT);
                exchange.getResponseHeaders().put(Headers.LOCATION, "/");
                exchange.getResponseSender().close();
            }
View Full Code Here

    protected void logoutSession(SessionManager manager, String httpSessionId) {
        log.debug("logoutHttpSession: " + httpSessionId);
        Session session = getSessionById(manager, httpSessionId);
        try {
            session.invalidate(null);
        } catch (Exception e) {
            log.warnf("Session %s not present or already invalidated.", httpSessionId);
        }
    }
View Full Code Here

            ((UndertowRequestAuthenticator)authenticator).propagateKeycloakContext(account);
            return true;
        } else {
            log.debug("Account was not active, returning false");
            session.removeAttribute(KeycloakUndertowAccount.class.getName());
            session.invalidate(exchange);
            return false;
        }
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.