OAuth2ResourceServerSpec should allow its ServerBearerTokenAuthenticationConverter to be configurable
See original GitHub issueCurrently in ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec.configure(ServerHttpSecurity)
the ServerBearerTokenAuthenticationConverter
is hard-coded in the configure
method. The non-reactive side (OAuth2ResourceServerConfigurer
) allows for the user to supply a BearerTokenResolver
. The reactive side should allow for the same.
I propose adding similar functionality to ServerHttpSecurity.OAuth2ResourceServerSpec
for this.
I’m happy to supply a PR for this if you would like.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Configure Spring Security 5 Oauth 2 to use access_token uri ...
I am creating a OAuth2 resource server. Unfortunately the OAuth2ResourceServerSpec does not allow authenticationConverter to be set. spring ...
Read more >OAuth 2.0 Resource Server :: Spring Security
When this property and these dependencies are used, Resource Server will automatically configure itself to validate JWT-encoded Bearer Tokens. It achieves ...
Read more >spring-projects/spring-security - Gitter
OAuth2ResourceServerSpec the default ServerBearerTokenAuthenticationConverter is not overridable like it is on the servlet side (i.e. BearerTokenResolver )?.
Read more >org.springframework.security.web.server ... - Tabnine
ServerHttpSecurity$OAuth2ResourceServerSpec$JwtSpec.configure(. ... implemented logic in AuthenticationWebFilter and set a custom * SuccessHandler that will ...
Read more >org.springframework.security.config.web.server.ServerHttpSecurity ...
It allows configuring web based security for specific http requests. ... If neither has been configured, the Cors configuration will do nothing.
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
@edeandrea So, we do have
ServerAuthenticationConverter
, which I think would suffice for this case.And since an extra interface is really only saving the user a couple of lines (going from String to Authentication), we can probably afford to wait on that.
Note that this is how the same functionality is exposed in OAuth2Login, so it’s also nice to stay consistent where possible.
I just submitted #6190