Skip to content

Add DefaultRelyingPartyRegistrationResolver #8899

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

Closed
wants to merge 2 commits into from

Conversation

jzheaux
Copy link
Contributor

@jzheaux jzheaux commented Aug 3, 2020

No description provided.

@jzheaux jzheaux self-assigned this Aug 3, 2020
@jzheaux jzheaux linked an issue Aug 3, 2020 that may be closed by this pull request
@jzheaux jzheaux added this to the 5.4.0-RC1 milestone Aug 3, 2020
Copy link
Contributor

@evgeniycheban evgeniycheban left a comment

Choose a reason for hiding this comment

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

@jzheaux I've left a few minor comments inline.

private Saml2AuthenticationRequestContextResolver getContextResolver(B http) {
Saml2AuthenticationRequestContextResolver resolver = getBeanOrNull(http, Saml2AuthenticationRequestContextResolver.class);
if (resolver == null) {
return new DefaultSaml2AuthenticationRequestContextResolver(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to have a single return statement.
new DefaultSaml2AuthenticationRequestContextResolver can be moved into getDefaultContextResolver method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm of a different opinion on this one. I think returning early is more readable.

However, since that's probably in the eye of the beholder, what I'd propose for now is aligning with how other similar methods in the class, like getResolver. We can consider changing both methods at another time.

@jzheaux
Copy link
Contributor Author

jzheaux commented Aug 5, 2020

Thanks for the feedback, @evgeniycheban, it was very helpful.

I incorporated it and committed the changes in 015281f to master.

@jzheaux jzheaux closed this Aug 5, 2020
@jzheaux jzheaux deleted the gh-8887 branch August 5, 2020 00:48
@jzheaux jzheaux changed the title Add DefaultRelyingPartyResolver Add DefaultRelyingPartyRegistrationResolver Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding RelyingPartyRegistrationResolver
2 participants