当前位置: 首页>>代码示例>>Java>>正文


Java LogoutSuccessHandler类代码示例

本文整理汇总了Java中org.springframework.security.web.authentication.logout.LogoutSuccessHandler的典型用法代码示例。如果您正苦于以下问题:Java LogoutSuccessHandler类的具体用法?Java LogoutSuccessHandler怎么用?Java LogoutSuccessHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LogoutSuccessHandler类属于org.springframework.security.web.authentication.logout包,在下文中一共展示了LogoutSuccessHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@SuppressWarnings("ProhibitedExceptionDeclared")
@Override
protected void configure(final HttpSecurity http) throws Exception {
    final AuthenticationEntryPoint ssoEntryPoint = new SsoAuthenticationEntryPoint(SsoController.SSO_PAGE);

    final SsoAuthenticationFilter<?> ssoAuthenticationFilter = new SsoAuthenticationFilter<>(SsoController.SSO_AUTHENTICATION_URI, EntityType.CombinedSso.INSTANCE);
    ssoAuthenticationFilter.setAuthenticationManager(authenticationManager());

    final LogoutSuccessHandler logoutSuccessHandler = new HodTokenLogoutSuccessHandler(SsoController.SSO_LOGOUT_PAGE, tokenRepository);

    http.regexMatcher("/public(/.*)?|/sso|/authenticate-sso|/api/authentication/.*|/logout")
        .csrf()
            .disable()
        .exceptionHandling()
            .authenticationEntryPoint(ssoEntryPoint)
            .accessDeniedPage(DispatcherServletConfiguration.AUTHENTICATION_ERROR_PATH)
            .and()
        .authorizeRequests()
            .antMatchers(FindController.APP_PATH + "/**").hasRole(FindRole.USER.name())
            .and()
        .logout()
            .logoutSuccessHandler(logoutSuccessHandler)
            .and()
        .addFilterAfter(ssoAuthenticationFilter, AbstractPreAuthenticatedProcessingFilter.class);
}
 
开发者ID:hpe-idol,项目名称:find,代码行数:26,代码来源:HodSecurity.java

示例2: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
protected LogoutSuccessHandler logoutSuccessHandler() {
	return new LogoutSuccessHandler() {
		
		@Override
		public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
				throws IOException, ServletException {
			response.getWriter().append("OK");
			response.setStatus(200);
		}
	};
}
 
开发者ID:vishal1997,项目名称:DiscussionPortal,代码行数:12,代码来源:AuthenticationHandler.java

示例3: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
/**
 * Logout success handler, removing cookie auth
 *
 * @return
 */
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
	return (HttpServletRequest request, HttpServletResponse response, Authentication authentication) -> {
		if (authentication != null && authentication.getPrincipal() != null) {
			LOG.info("LOGOUT >>> " + authentication.getPrincipal());
		} else {
			LOG.info("LOGOUT >>> called without authentication");
		}
		apiAuth.remove(request, response);
		response.setStatus(HttpServletResponse.SC_OK);
		response.getWriter().flush();
	};
}
 
开发者ID:alextremp,项目名称:stateless-rest-jwtcookie-demo,代码行数:19,代码来源:SecurityInternalConfig.java

示例4: dashboardLogoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean(name = "dashboardLogoutSuccessHandler")
public LogoutSuccessHandler dashboardLogoutSuccessHandler() {
    final SimpleUrlLogoutSuccessHandler logoutSuccessHandler = new SimpleUrlLogoutSuccessHandler();

    logoutSuccessHandler.setRedirectStrategy(new DashboardLogoutRedirectStrategy(logoutUrl));

    return logoutSuccessHandler;
}
 
开发者ID:bsblabs,项目名称:cf-sample-service,代码行数:9,代码来源:DashboardSecurityConfiguration.java

示例5: ajaxLogoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler ajaxLogoutSuccessHandler() {
  return (request, response, authentication) -> {
    response.setStatus(HttpServletResponse.SC_OK);
    response.flushBuffer();
  };
}
 
开发者ID:mnivoliez,项目名称:CardWizard,代码行数:8,代码来源:SecurityConfig.java

示例6: casLogoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler casLogoutSuccessHandler() {
	CasLogoutSuccessHandler handler = new CasLogoutSuccessHandler();
	handler.setCasUrl(casUrl);
	handler.setDefaultTarget(rootUrl);

	return handler;
}
 
开发者ID:thm-projects,项目名称:arsnova-backend,代码行数:9,代码来源:SecurityConfig.java

示例7: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
    return new LogoutSuccessHandlerImpl();
}
 
开发者ID:yuexine,项目名称:loafer,代码行数:5,代码来源:SecurityConfiguration.java

示例8: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
	return (request, response, authentication) -> response.setStatus(HttpServletResponse.SC_OK);
}
 
开发者ID:adessoAG,项目名称:JenkinsHue,代码行数:5,代码来源:SecurityConfiguration.java

示例9: logoutSuccessHandlerImpl

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandlerImpl() {
    return new LogoutSuccessHandlerRestImpl();
}
 
开发者ID:melthaw,项目名称:spring-backend-boilerplate,代码行数:5,代码来源:OpenApiSecurityConfigurer.java

示例10: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
  return new CustomLogoutSuccessHandler();
}
 
开发者ID:fier-liu,项目名称:FCat,代码行数:5,代码来源:WebSecurityConfig.java

示例11: PentahoSamlLogoutFilter

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public PentahoSamlLogoutFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler[] localHandler, LogoutHandler[] globalHandlers ) {
  super( logoutSuccessHandler, localHandler, globalHandlers );
}
 
开发者ID:pentaho,项目名称:pentaho-engineering-samples,代码行数:4,代码来源:PentahoSamlLogoutFilter.java

示例12: PentahoSamlLogoutProcessingFilter

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public PentahoSamlLogoutProcessingFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler... handlers ) {
  super( logoutSuccessHandler, handlers );
}
 
开发者ID:pentaho,项目名称:pentaho-engineering-samples,代码行数:4,代码来源:PentahoSamlLogoutProcessingFilter.java

示例13: setDelegate

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public void setDelegate(LogoutSuccessHandler delegate) {
    this.delegate = delegate;
}
 
开发者ID:hflabs,项目名称:perecoder,代码行数:4,代码来源:AuthenticationCleanedEventHandler.java

示例14: logoutSuccessHandler

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
    return new AjaxLogoutSuccessHandler();
}
 
开发者ID:learning-layers,项目名称:LivingDocumentsServer,代码行数:5,代码来源:OIDCSecurityConfig.java

示例15: configureGlobal

import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth, AuthManager authManager, LogoutSuccessHandler logoutSuccessHandler) throws Exception {
    this.logoutSuccessHandler = logoutSuccessHandler;
    auth.authenticationProvider(new LaunchKeyAuthenticationProvider(authManager));
}
 
开发者ID:iovation,项目名称:launchkey-java,代码行数:6,代码来源:SecurityConfig.java


注:本文中的org.springframework.security.web.authentication.logout.LogoutSuccessHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。