Skip to content

Builder for JwtDecoder #6010

Closed
Closed
@jzheaux

Description

@jzheaux

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();

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions