Java 类org.springframework.security.web.authentication.logout.LogoutSuccessHandler 实例源码

项目:find    文件:HodSecurity.java   
@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);
}
项目:DiscussionPortal    文件:AuthenticationHandler.java   
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);
        }
    };
}
项目:stateless-rest-jwtcookie-demo    文件:SecurityInternalConfig.java   
/**
 * 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();
    };
}
项目:cf-sample-service    文件:DashboardSecurityConfiguration.java   
@Bean(name = "dashboardLogoutSuccessHandler")
public LogoutSuccessHandler dashboardLogoutSuccessHandler() {
    final SimpleUrlLogoutSuccessHandler logoutSuccessHandler = new SimpleUrlLogoutSuccessHandler();

    logoutSuccessHandler.setRedirectStrategy(new DashboardLogoutRedirectStrategy(logoutUrl));

    return logoutSuccessHandler;
}
项目:CardWizard    文件:SecurityConfig.java   
@Bean
public LogoutSuccessHandler ajaxLogoutSuccessHandler() {
  return (request, response, authentication) -> {
    response.setStatus(HttpServletResponse.SC_OK);
    response.flushBuffer();
  };
}
项目:arsnova-backend    文件:SecurityConfig.java   
@Bean
public LogoutSuccessHandler casLogoutSuccessHandler() {
    CasLogoutSuccessHandler handler = new CasLogoutSuccessHandler();
    handler.setCasUrl(casUrl);
    handler.setDefaultTarget(rootUrl);

    return handler;
}
项目:loafer    文件:SecurityConfiguration.java   
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
    return new LogoutSuccessHandlerImpl();
}
项目:JenkinsHue    文件:SecurityConfiguration.java   
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
    return (request, response, authentication) -> response.setStatus(HttpServletResponse.SC_OK);
}
项目:spring-backend-boilerplate    文件:OpenApiSecurityConfigurer.java   
@Bean
public LogoutSuccessHandler logoutSuccessHandlerImpl() {
    return new LogoutSuccessHandlerRestImpl();
}
项目:FCat    文件:WebSecurityConfig.java   
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
  return new CustomLogoutSuccessHandler();
}
项目:pentaho-engineering-samples    文件:PentahoSamlLogoutFilter.java   
public PentahoSamlLogoutFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler[] localHandler, LogoutHandler[] globalHandlers ) {
  super( logoutSuccessHandler, localHandler, globalHandlers );
}
项目:pentaho-engineering-samples    文件:PentahoSamlLogoutProcessingFilter.java   
public PentahoSamlLogoutProcessingFilter( LogoutSuccessHandler logoutSuccessHandler, LogoutHandler... handlers ) {
  super( logoutSuccessHandler, handlers );
}
项目:perecoder    文件:AuthenticationCleanedEventHandler.java   
public void setDelegate(LogoutSuccessHandler delegate) {
    this.delegate = delegate;
}
项目:LivingDocumentsServer    文件:OIDCSecurityConfig.java   
@Bean
public LogoutSuccessHandler logoutSuccessHandler() {
    return new AjaxLogoutSuccessHandler();
}
项目:launchkey-java    文件:SecurityConfig.java   
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth, AuthManager authManager, LogoutSuccessHandler logoutSuccessHandler) throws Exception {
    this.logoutSuccessHandler = logoutSuccessHandler;
    auth.authenticationProvider(new LaunchKeyAuthenticationProvider(authManager));
}
项目:spring-boot-security-saml    文件:LogoutConfigurer.java   
/**
 * Handler to be invoked upon successful logout. Overrides value set by {@link #defaultTargetURL(String)}.
 *
 * @param handler the handler to invoke upon successful logout.
 * @return this configurer for further customization
 */
public LogoutConfigurer successHandler(LogoutSuccessHandler handler) {
    successHandler = handler;
    return this;
}
项目:communote-server    文件:CommunoteLogoutFilter.java   
/**
 * Constructor.
 *
 * @param logoutSuccessHandler
 *            The logout success handler.
 * @param handlers
 *            The handlers.
 */
public CommunoteLogoutFilter(LogoutSuccessHandler logoutSuccessHandler, LogoutHandler[] handlers) {
    super(logoutSuccessHandler, handlers);
}