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 Supplier JwtDecoders #10310

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Add Supplier JwtDecoders #10310

merged 1 commit into from
Sep 22, 2021

Conversation

jzheaux
Copy link
Contributor

@jzheaux jzheaux commented Sep 21, 2021

Closes gh-9991

UPDATE - @rwinch and I chatted, and we'll leave gh-10309 out for now to keep the review smaller.

To use, you can publish a JwtDecoder like so:

@Bean 
JwtDecoder jwtDecoder() {
    Supplier<JwtDecoder> supplier = () -> JwtDecoder.withIssuerLocation("http://issuer/location");
    return new SupplierJwtDecoder(supplier);
}

Spring Boot could publish a SupplierJwtDecoder instead of a NimbusJwtDecoder.

@jzheaux jzheaux changed the title Add NimbusJwtDecoder#withIssuerLocation Add Supplier JwtDecoders Sep 21, 2021
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks @jzheaux I provided feedback inline.

@jzheaux jzheaux merged commit 4e7c9be into spring-projects:main Sep 22, 2021
@jzheaux jzheaux deleted the gh-9991 branch September 22, 2021 16:59
@jzheaux jzheaux self-assigned this Sep 22, 2021
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: duplicate A duplicate of another issue type: enhancement A general enhancement labels Sep 22, 2021
@jzheaux jzheaux added this to the 5.6.0-RC1 milestone Sep 22, 2021
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) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

please support lazily doing issuer checks (and all other checks) on startup for oauth resource servers
2 participants