本文整理匯總了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));
}