Example usage for org.springframework.security.web.authentication.logout SecurityContextLogoutHandler setClearAuthentication

List of usage examples for org.springframework.security.web.authentication.logout SecurityContextLogoutHandler setClearAuthentication

Introduction

In this page you can find the example usage for org.springframework.security.web.authentication.logout SecurityContextLogoutHandler setClearAuthentication.

Prototype

public void setClearAuthentication(boolean clearAuthentication) 

Source Link

Document

If true, removes the Authentication from the SecurityContext to prevent issues with concurrent requests.

Usage

From source file:com.naveen.demo.config.Saml2SSOConfig.java

@Bean
public SecurityContextLogoutHandler logoutHandler() {
    SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
    logoutHandler.setInvalidateHttpSession(true);
    logoutHandler.setClearAuthentication(true);
    return logoutHandler;
}

From source file:com.netflix.genie.web.security.saml.SAMLConfig.java

/**
 * Logout handler terminating local session.
 *
 * @return The security context logout handler
 * @see SecurityContextLogoutHandler/*www  .  ja v  a  2 s.  c  o m*/
 */
@Bean
public SecurityContextLogoutHandler logoutHandler() {
    final SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
    logoutHandler.setInvalidateHttpSession(true);
    logoutHandler.setClearAuthentication(true);
    return logoutHandler;
}

From source file:it.infn.mw.iam.config.saml.SamlConfig.java

@Bean
public SecurityContextLogoutHandler logoutHandler() {

    SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
    logoutHandler.setInvalidateHttpSession(true);
    logoutHandler.setClearAuthentication(true);
    return logoutHandler;
}

From source file:org.ambraproject.wombat.config.SpringSecurityConfiguration.java

private LogoutFilter requestLogoutFilter() {
    // This filter redirects to the CAS Server to signal Single Logout should be performed
    SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
    logoutHandler.setClearAuthentication(true);
    logoutHandler.setInvalidateHttpSession(true);
    LogoutFilter logoutFilter = new LogoutFilter(getLogoutSuccessHandler(), logoutHandler);
    logoutFilter.setFilterProcessesUrl(CAS_LOGOUT_URI);
    return logoutFilter;
}