There should be documentation for BearerTokenConverter in reactive OAuth2ResourceServer docs.
Example configuration.
@Bean
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
http
.authorizeExchange(exchanges -> exchanges
.pathMatchers("/message/**").hasAuthority("SCOPE_message:read")
.anyExchange().authenticated()
)
.oauth2ResourceServer(oauth2 -> oauth2
.bearerTokenConverter(myCustomBearerTokenConverter())
.jwt(withDefaults())
);
return http.build();
}
Comment From: jzheaux
@muhdalavu have you already checked here: https://docs.spring.io/spring-security/reference/reactive/oauth2/resource-server/bearer-tokens.html#webflux-oauth2resourceserver-bearertoken-resolver
Maybe the documentation could link better to that location. Do you have any recommendations?
Comment From: muhdalavu
Thank you for your update. Having a dedicated bearer token doc page makes sense.