本文整理汇总了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);
}
示例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);
}
};
}
示例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();
};
}
示例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;
}
示例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();
};
}
示例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;
}
示例7: logoutSuccessHandler
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
return new LogoutSuccessHandlerImpl();
}
示例8: logoutSuccessHandler
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
return (request, response, authentication) -> response.setStatus(HttpServletResponse.SC_OK);
}
示例9: logoutSuccessHandlerImpl
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandlerImpl() {
return new LogoutSuccessHandlerRestImpl();
}
示例10: logoutSuccessHandler
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
return new CustomLogoutSuccessHandler();
}
示例11: PentahoSamlLogoutFilter
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public PentahoSamlLogoutFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler[] localHandler, LogoutHandler[] globalHandlers ) {
super( logoutSuccessHandler, localHandler, globalHandlers );
}
示例12: PentahoSamlLogoutProcessingFilter
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public PentahoSamlLogoutProcessingFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler... handlers ) {
super( logoutSuccessHandler, handlers );
}
示例13: setDelegate
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
public void setDelegate(LogoutSuccessHandler delegate) {
this.delegate = delegate;
}
示例14: logoutSuccessHandler
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; //导入依赖的package包/类
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
return new AjaxLogoutSuccessHandler();
}
示例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));
}