Skip to content

Builder for JwtDecoder #6010

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
jzheaux opened this issue Oct 23, 2018 · 5 comments
Closed

Builder for JwtDecoder #6010

jzheaux opened this issue Oct 23, 2018 · 5 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Oct 23, 2018

It would be nice to be able to specify validators, converters, etc. without needing to downcast to the implementation.

Current Behavior

To configure any of these, I first use a factory method, and then I need to downcast to NimbusJwtDecoder to call its setters:

JwtDecoder decoder = JwtDecoders.fromOidcIssuerLocation(issuer);
((NimbusJwtDecoder) decoder).setJwtValidator(validator);
...

Expected Behavior

For now, this ticket is just to get the conversation started. But something like JwtDecoderBuilder might be nice:

JwtDecoder decoder = JwtDecoders
    .withOidcIssuerLocation(issuer).jwtValidator(validator).build();
@jzheaux jzheaux added type: enhancement A general enhancement in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Oct 23, 2018
@jzheaux jzheaux added this to the 5.2.x milestone Oct 23, 2018
@jzheaux jzheaux self-assigned this Nov 9, 2018
jzheaux added a commit to jzheaux/spring-security that referenced this issue Nov 12, 2018
A Builder to simply common construction patterns for NimbusJwtDecoder

Issue: spring-projectsgh-6010
rwinch pushed a commit that referenced this issue Nov 14, 2018
A Builder to simply common construction patterns for NimbusJwtDecoder

Issue: gh-6010
jer051 pushed a commit to jer051/spring-security that referenced this issue Nov 21, 2018
A Builder to simply common construction patterns for NimbusJwtDecoder

Issue: spring-projectsgh-6010
@izeye
Copy link
Contributor

izeye commented Dec 6, 2018

This seems to be resolved via d28e32b.

@jzheaux
Copy link
Contributor Author

jzheaux commented Dec 6, 2018

@izeye d28e32b is a good starting point for this but is ultimately focused on NimbusJwtDecoder. This task is about adding more versatility to JwtDecoders.

That commit may ultimately inform how we complete this ticket, though, which is why it references this issue.

@izeye
Copy link
Contributor

izeye commented Dec 6, 2018

@jzheaux Ah, sorry for the noise. I just thought so with the referenced issue number in the commit.

@jzheaux
Copy link
Contributor Author

jzheaux commented Dec 7, 2018

@izeye no worries! Your help is always appreciated.

@jzheaux
Copy link
Contributor Author

jzheaux commented Apr 17, 2020

Closed in favor of #8412

@jzheaux jzheaux closed this as completed Apr 17, 2020
@jzheaux jzheaux added the status: declined A suggestion or change that we don't feel we should currently apply label Apr 17, 2020
@rwinch rwinch removed this from the General Backlog milestone Apr 20, 2020
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: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants