Add configuration support for Opaque Token authentication
See original GitHub issueIn Spring Security 5.2.0.M2, users can configure the OAuth 2.0 Resource Server to validate opaque tokens through Introspection:
http
.oauth2ResourceServer()
.opaqueToken();
It would be nice if this could be property-driven, e.g.:
spring:
security:
oauth2:
resourceserver:
opaque-token:
introspection-uri: https://endpoint
client-id: client_id
client-secret: client_secret
Then, Spring Boot could register an instance of OAuth2TokenIntrospectionClient
:
@Bean
public OAuth2TokenIntrospectionClient introspectionClient() {
return new NimbusOAuth2TokenIntrospectionClient(uri, clientId, clientSecret);
}
Note that this configuration is only valid if OAuth2IntrospectionAuthenticationToken
is on the classpath.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
OAuth 2.0 Resource Server Opaque Token :: Spring Security
Once a token is authenticated, an instance of BearerTokenAuthentication is set in the SecurityContext . This means that it's available in @Controller methods ......
Read more >JWT vs Opaque Access Tokens: Use Both With Spring Boot
Configure Spring Security to Validate JWTs and Opaque Tokens. Everything up until now has been boilerplate, now we get to the fun part!...
Read more >Build a Spring Boot Application That Uses BOTH Opaque and ...
Learn how to get the benefits from both JWT and opaque access tokens in your Spring Boot application in this tutorialCode on GitHub: ......
Read more >OAuth 2.0 Resource Server With Spring Security 5 - Baeldung
Learn how to configure a Spring Security based resource server application for validating JWT as well as opaque tokens.
Read more >Opaque Token Implementation in spring security
Hello, thank you for the answer yes i am trying to secure my endpoint using opaque tokens i've found this method by using...
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
@jzheaux mentioned that they’re looking at finding a new home for client id and secret. I’ll mark this one as blocked till then.
That makes sense to me. I’ve unblocked the issue.