Skip to content

Add JwtClaimValidator #7962

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 1 commit into from

Conversation

zeeshanadnan
Copy link
Contributor

fixes gh-7860

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 9, 2020
@zeeshanadnan zeeshanadnan requested a review from jzheaux February 9, 2020 18:18
@zeeshanadnan
Copy link
Contributor Author

Hi @jzheaux feedback on code & implementation improvements is highly appreciated.

Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @zeeshanadnan! I've left some feedback inline.

@jzheaux jzheaux self-assigned this Feb 10, 2020
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 10, 2020
@jzheaux jzheaux added this to the 5.3.0 milestone Feb 10, 2020
@zeeshanadnan zeeshanadnan force-pushed the gh-7860 branch 2 times, most recently from d5ff515 to fab1428 Compare February 10, 2020 20:38
@zeeshanadnan
Copy link
Contributor Author

Hi @jzheaux updated the PR with the requested changes. For any further changes let me know.

@zeeshanadnan zeeshanadnan requested a review from jzheaux February 16, 2020 19:18
@jzheaux
Copy link
Contributor

jzheaux commented Feb 20, 2020

@zeeshanadnan thanks for the edits!

Since JwtClaimValidator is a generalization of JwtIssuerValidator, then JwtIssuerValidator should be able to use it.

As part of this PR, would you please change JwtIssuerValidator to use JwtClaimValidator? I believe that you could do something like:

public JwtIssuerValidator(String issuer) {
    this.validator = new JwtClaimValidator(ISS, iss -> issuer.equals(iss));
}

This will help reinforce the contract being proposed.

@zeeshanadnan
Copy link
Contributor Author

Hi @jzheaux, updated the PR with requested changes.

@jzheaux
Copy link
Contributor

jzheaux commented Feb 25, 2020

Thanks, @zeeshanadnan! This is now merged into master via 431cd60.

Also, I updated some related tests in 283e451

@jzheaux jzheaux closed this Feb 25, 2020
@zeeshanadnan zeeshanadnan deleted the gh-7860 branch February 25, 2020 20:46
@zeeshanadnan
Copy link
Contributor Author

@jzheaux thanks for the merge & guidance. Sorry for lot of iterations & any inconvenience.

@jzheaux
Copy link
Contributor

jzheaux commented Feb 26, 2020

My pleasure, @zeeshanadnan. I think I caused some of that churn, too. :)

I hope to see more contributions from you! Thanks, again, for taking the initiative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding JwtClaimValidator
3 participants