/** * Specifies if {@link SecurityContextLogoutHandler} should clear the {@link Authentication} at the time of logout. * @param clearAuthentication true {@link SecurityContextLogoutHandler} should clear the {@link Authentication} (default), or false otherwise. * @return the {@link LogoutConfigurer} for further customization */ public LogoutConfigurer<H> clearAuthentication(boolean clearAuthentication) { contextLogoutHandler.setClearAuthentication(clearAuthentication); return this; }
/** * Specifies if {@link SecurityContextLogoutHandler} should clear the {@link Authentication} at the time of logout. * @param clearAuthentication true {@link SecurityContextLogoutHandler} should clear the {@link Authentication} (default), or false otherwise. * @return the {@link LogoutConfigurer} for further customization */ public LogoutConfigurer<H> clearAuthentication(boolean clearAuthentication) { contextLogoutHandler.setClearAuthentication(clearAuthentication); return this; }
/** * Specifies if {@link SecurityContextLogoutHandler} should clear the {@link Authentication} at the time of logout. * @param clearAuthentication true {@link SecurityContextLogoutHandler} should clear the {@link Authentication} (default), or false otherwise. * @return the {@link LogoutConfigurer} for further customization */ public LogoutConfigurer<H> clearAuthentication(boolean clearAuthentication) { contextLogoutHandler.setClearAuthentication(clearAuthentication); return this; }
@Bean public SecurityContextLogoutHandler logoutHandler() { SecurityContextLogoutHandler handler = new SecurityContextLogoutHandler(); //handler.setInvalidateHttpSession(true); handler.setClearAuthentication(true); return handler; }
@Bean public SecurityContextLogoutHandler logoutHandler() { SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler(); logoutHandler.setInvalidateHttpSession(true); logoutHandler.setClearAuthentication(true); return logoutHandler; }
/** * Logout handler terminating local session. * * @return The security context logout handler * @see SecurityContextLogoutHandler */ @Bean public SecurityContextLogoutHandler logoutHandler() { final SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler(); logoutHandler.setInvalidateHttpSession(true); logoutHandler.setClearAuthentication(true); return logoutHandler; }
private SecurityContextLogoutHandler logoutHandler() { SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler(); logoutHandler.setInvalidateHttpSession(true); logoutHandler.setClearAuthentication(true); return logoutHandler; }
SecurityContextLogoutHandler logoutHandler = createDefaultLocalHandler(); logoutHandler.setInvalidateHttpSession(Optional.ofNullable(invalidateSession).orElseGet(config::isInvalidateSession)); logoutHandler.setClearAuthentication(Optional.ofNullable(clearAuthentication).orElseGet(config::isClearAuthentication)); localHandler = postProcess(logoutHandler); SecurityContextLogoutHandler logoutHandler = createDefaultGlobalHandler(); logoutHandler.setInvalidateHttpSession(Optional.ofNullable(invalidateSession).orElseGet(config::isInvalidateSession)); logoutHandler.setClearAuthentication(Optional.ofNullable(clearAuthentication).orElseGet(config::isClearAuthentication)); globalHandler = postProcess(logoutHandler);