-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Create CompositeLogoutHandler #3895
Copy link
Copy link
Closed
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)type: enhancementA general enhancementA general enhancement
Description
We should create a CompositeLogoutHandler which allows for a List<LogoutHandler> to be injected into it. The implementation would simply iterate over all the LogoutHandler instances. Then we can leverage the CompositeLogoutHandler in places like LogoutFilter,HttpServlet3RequestFactory,SecurityContextHolderAwareRequestFilter, andConcurrentSessionFilter`
UPDATE
It would look something like:
public final class CompositeLogoutHandler implements LogoutHandler {
private final List<LogoutHandler> logoutHandlers;
public CompositeLogoutHandler(LogoutHandler... logoutHandlers) {
this.logoutHandlers = Arrays.asList(logoutHandlers);
}
public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication ) {
for(LogoutHandler delegate : delegates) {
delegate.logout(request, response, authentication);
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)type: enhancementA general enhancementA general enhancement