Package org.springframework.security.web.authentication.logout

Examples of org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler


    public static void contributeLogoutService(
            final OrderedConfiguration<LogoutHandler> cfg,
            @Inject RequestGlobals globals,
            @InjectService( "RememberMeLogoutHandler" ) final LogoutHandler rememberMeLogoutHandler ) {

        cfg.add( "securityContextLogoutHandler", new SecurityContextLogoutHandler() );
        cfg.add( "rememberMeLogoutHandler", rememberMeLogoutHandler );
        cfg.add( "tapestryLogoutHandler", new TapestryLogoutHandler( globals ) ,new String[0]);
    }
View Full Code Here


    public static void contributeLogoutService(
            final OrderedConfiguration<LogoutHandler> cfg,
            @Inject RequestGlobals globals,
            @InjectService( "RememberMeLogoutHandler" ) final LogoutHandler rememberMeLogoutHandler ) {

        cfg.add( "securityContextLogoutHandler", new SecurityContextLogoutHandler() );
        cfg.add( "rememberMeLogoutHandler", rememberMeLogoutHandler );
        cfg.add( "tapestryLogoutHandler", new TapestryLogoutHandler( globals ) ,new String[0]);
    }
View Full Code Here

*/
public class LogoutHandlerTests extends TestCase {
    LogoutFilter filter;

    protected void setUp() throws Exception {
        filter = new LogoutFilter("/success", new SecurityContextLogoutHandler());
    }
View Full Code Here

        MockHttpServletResponse response = new MockHttpServletResponse();

        // Setup our test fixture and registry to want this session to be expired
        ConcurrentSessionFilter filter = new ConcurrentSessionFilter();
        filter.setRedirectStrategy(new DefaultRedirectStrategy());
        filter.setLogoutHandlers(new LogoutHandler[] {new SecurityContextLogoutHandler()});

        SessionRegistry registry = new SessionRegistryImpl();
        registry.registerNewSession(session.getId(), "principal");
        registry.getSessionInformation(session.getId()).expireNow();
        filter.setSessionRegistry(registry);
View Full Code Here

        if (!StringUtils.hasText(invalidateSession)) {
            invalidateSession = DEF_INVALIDATE_SESSION;
        }

        ManagedList handlers = new ManagedList();
        SecurityContextLogoutHandler sclh = new SecurityContextLogoutHandler();
        if ("true".equals(invalidateSession)) {
            sclh.setInvalidateHttpSession(true);
        } else {
            sclh.setInvalidateHttpSession(false);
        }
        handlers.add(sclh);

        if (rememberMeServices != null) {
            handlers.add(new RuntimeBeanReference(rememberMeServices));
View Full Code Here

    @Override
    public void initializeFromConfig(SecurityNamedServiceConfig config) throws IOException {
        super.initializeFromConfig(config);
       
        logoutHandler = new SecurityContextLogoutHandler();
        redirectUrl= ((LogoutFilterConfig) config).getRedirectURL();
        logoutSuccessHandler=new SimpleUrlLogoutSuccessHandler();
        if (StringUtils.hasLength(redirectUrl))           
            logoutSuccessHandler.setDefaultTargetUrl(redirectUrl);           
        pathInfos=GeoServerSecurityFilterChain.FORM_LOGOUT_CHAIN.split(",");   
View Full Code Here

        return exceptionTranslationFilter;
    }

    @Bean
    public Filter logoutFilter() {
        SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
        logoutHandler.setInvalidateHttpSession(false);
        LogoutFilter logoutFilter = new LogoutFilter(applicationUrl("/"), logoutHandler);
        logoutFilter.setFilterProcessesUrl(applicationUrl("/logout"));
        return logoutFilter;
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler

Copyright © 2018 www.massapicom. 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.