Builder for JwtDecoder
See original GitHub issueIt 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();
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
OAuth 2.0 Resource Server JWT :: Spring Security
For greater power, though, we can use a builder that ships with NimbusReactiveJwtDecoder : Java. Kotlin. @Bean ReactiveJwtDecoder jwtDecoder() { return ...
Read more >Allow customization of restOperations for JwtDecoder built ...
JwkSetUriJwtDecoderBuilder allows customizing the restOperations that is used to make calls to the authorization server.
Read more >Confused about Spring Security Jwt token builder - why do I ...
JwtDecoder . In my case, I have a duel security config setup that accepts tokens from Cognito and my own JWT provider which...
Read more >org.springframework.security.oauth2.jwt java code examples
@Bean NimbusJwtDecoder jwtDecoder() { JWTProcessor<SecurityContext> jwtProcessor = JwtProcessors.withJwkSetUri("https://example.org/.well-known/jwks.json") ...
Read more >JSON Web Tokens - jwt.io
JSON Web Token (JWT) is a compact URL-safe means of representing claims to be transferred between two parties. The claims in a JWT...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@izeye no worries! Your help is always appreciated.
Closed in favor of https://github.com/spring-projects/spring-security/issues/8412