Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

eddumelendez
Copy link
Contributor

@eddumelendez eddumelendez commented May 30, 2016

  • I have signed the CLA

Fixes gh-3895

/**
* @author Eddú Meléndez
*/
public class CompositeLogoutHandler implements LogoutHandler {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark as final

@rwinch
Copy link
Member

rwinch commented May 31, 2016

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?

@rwinch rwinch added the status: waiting-for-feedback We need additional information before we can continue label May 31, 2016
@@ -58,6 +59,7 @@
private RequestMatcher logoutRequestMatcher;

private final List<LogoutHandler> handlers;
private CompositeLogoutHandler compositeLogoutHandler;
Copy link
Member

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

@eddumelendez
Copy link
Contributor Author

@rwinch PR is updated. Comments have been fixed and new test was added to cover CompositeLogoutHandler.

@pivotal-issuemaster
Copy link

@eddumelendez Please sign the Contributor License Agreement!

@pivotal-issuemaster
Copy link

@eddumelendez Thank you for signing the Contributor License Agreement!

@pivotal-issuemaster
Copy link

@eddumelendez Thank you for signing the Contributor License Agreement!

@eddumelendez
Copy link
Contributor Author

@rwinch any feedback about this?

"logoutHandlers")).size())
.isEqualTo(1);
}

Copy link
Member

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.

@rwinch
Copy link
Member

rwinch commented Jul 7, 2016

@eddumelendez Bump

@eddumelendez
Copy link
Contributor Author

@rwinch sorry for the delay. PR updated!

@rwinch
Copy link
Member

rwinch commented Jul 8, 2016

@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.

@rwinch rwinch added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 8, 2016
@rwinch rwinch added this to the 4.2.0 M1 milestone Jul 8, 2016
@rwinch rwinch self-assigned this Jul 8, 2016
@rwinch rwinch closed this Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create CompositeLogoutHandler
3 participants