Java Code Examples for org.springframework.security.web.authentication.logout.LogoutHandler

The following examples show how to use org.springframework.security.web.authentication.logout.LogoutHandler. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * used to initialize logout Handler
 * 
 * @return
 */
@Bean
@Conditional(InsightsSAMLBeanInitializationCondition.class)
public SAMLLogoutFilter samlLogoutFilter() {
	LOG.debug(" Inside samlLogoutFilter ==== ");
	return new SAMLLogoutFilter(successLogoutHandler(), new LogoutHandler[] { logoutHandler() },
			new LogoutHandler[] { logoutHandler() });
}
 
Example 2
Source Project: api-layer   Source File: SecurityConfiguration.java    License: Eclipse Public License 2.0 4 votes vote down vote up
private LogoutHandler logoutHandler() {
    return (request, response, authentication) -> authenticationService.getJwtTokenFromRequest(request)
        .ifPresent(x ->
            authenticationService.invalidateJwtToken(x, true)
        );
}
 
Example 3
Source Project: FEBS-Security   Source File: FebsSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public LogoutHandler logoutHandler(){
    FebsLogoutHandler febsLogoutHandler = new FebsLogoutHandler();
    febsLogoutHandler.setSessionRegistry(sessionRegistry());
    return febsLogoutHandler;
}
 
Example 4
Source Project: blackduck-alert   Source File: AuthenticationHandler.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SAMLLogoutFilter samlLogoutFilter() {
    return new SAMLLogoutFilter(successLogoutHandler(),
        new LogoutHandler[] { logoutHandler() },
        new LogoutHandler[] { logoutHandler() });
}
 
Example 5
@Bean
public LogoutHandler cookieClearingLogoutHandler() {
    return new CookieClearingLogoutHandler();
}
 
Example 6
Source Project: spring-tsers-auth   Source File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SAMLLogoutFilter samlLogoutFilter() {
    return new SAMLLogoutFilter(successLogoutHandler(),
            new LogoutHandler[]{logoutHandler()},
            new LogoutHandler[]{logoutHandler()});
}
 
Example 7
Source Project: spring-boot-security-saml-samples   Source File: SAMLConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public SAMLLogoutFilter samlLogoutFilter() {
    SAMLLogoutFilter filter = new SAMLLogoutFilter(successLogoutHandler(), new LogoutHandler[]{logoutHandler()}, new LogoutHandler[]{logoutHandler()});
    filter.setFilterProcessesUrl("/saml/logout");
    return filter;
}
 
Example 8
/**
 * @return the OpenID Connect logout handler
 */
@Bean
public LogoutHandler oidcLogoutHandler() {
    return new OidcLogoutHandler();
}
 
Example 9
Source Project: hawkbit   Source File: SecurityAutoConfiguration.java    License: Eclipse Public License 1.0 4 votes vote down vote up
/**
 * @return {@link LogoutHandler} bean
 */
@Bean
@ConditionalOnMissingBean
public LogoutHandler logoutHandler() {
    return new SecurityContextLogoutHandler();
}
 
Example 10
@Bean
public SAMLLogoutFilter samlLogoutFilter() {
    return new SAMLLogoutFilter(successLogoutHandler(),
            new LogoutHandler[] { logoutHandler() },
            new LogoutHandler[] { logoutHandler() });
}
 
Example 11
Source Project: cxf-fediz   Source File: FederationLogoutFilter.java    License: Apache License 2.0 4 votes vote down vote up
public FederationLogoutFilter(LogoutSuccessHandler logoutSuccessHandler, LogoutHandler... handlers) {
    super(logoutSuccessHandler, handlers);
}
 
Example 12
Source Project: spring-boot-security-saml   Source File: LogoutConfigurer.java    License: MIT License 2 votes vote down vote up
/**
 * Handler to be invoked when local logout is selected. Overrides values set by {@link #clearAuthentication} and
 * {@link #invalidateSession} for local logout.
 *
 * @param handler the handler to be invoked.
 * @return this configurer for further customization
 */
public LogoutConfigurer localHandler(LogoutHandler handler) {
    localHandler = handler;
    return this;
}
 
Example 13
Source Project: spring-boot-security-saml   Source File: LogoutConfigurer.java    License: MIT License 2 votes vote down vote up
/**
 * Handler to be invoked when global logout is selected. Overrides values set by {@link #clearAuthentication} and
 * {@link #invalidateSession} for global logout.
 *
 * @param handler the handler to be invoked.
 * @return this configurer for further customization
 */
public LogoutConfigurer globalHandler(LogoutHandler handler) {
    globalHandler = handler;
    return this;
}