-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CompositeLogoutHandler #3904
Conversation
/** | ||
* @author Eddú Meléndez | ||
*/ | ||
public class CompositeLogoutHandler implements LogoutHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark as final
Thanks for the PR @eddumelendez! In general this looks pretty good. I provided some comments inline. Additionally, can we get unit tests for CompsiteLogoutHandler added? |
@@ -58,6 +59,7 @@ | |||
private RequestMatcher logoutRequestMatcher; | |||
|
|||
private final List<LogoutHandler> handlers; | |||
private CompositeLogoutHandler compositeLogoutHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the type to LogoutHandler
@rwinch PR is updated. Comments have been fixed and new test was added to cover |
@eddumelendez Please sign the Contributor License Agreement! |
@eddumelendez Thank you for signing the Contributor License Agreement! |
@eddumelendez Thank you for signing the Contributor License Agreement! |
@rwinch any feedback about this? |
"logoutHandlers")).size()) | ||
.isEqualTo(1); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test that ensures that the logoutHandlers that are injected are invoked when CompositeLogoutHandler.logout is invoked? This would likely work well with a mock.
We should also document what happens if an Exception happens in one of the LogoutHandlers (the remaining LogoutHandlers won't be invoked) and have a test to verify the documentation is correct.
@eddumelendez Bump |
@rwinch sorry for the delay. PR updated! |
@eddumelendez No problem...just was not like you since you are always on top of things :) This is now merged into master via 1effc18 I also applied a bit of polish via 70787fc NOTE: I modified the tests so that they weren't dependent on the name of the private variable. I'd prefer to keep tests verifying behavior rather than if a member variable is set or not. This is something that is no consistent w/ the codebase, but I'd like to keep it this way going forward. |
Fixes gh-3895