Is there a working OAuth2 example with WebFlux

I am trying to add OAuth2 to WebFlux and cannot find any working example.

To implement my own authorization server, I use the following code:

@EnableAuthorizationServer @Configuration public class ServerAuth extends AuthorizationServerConfigurerAdapter { ... } 

And my spring boot application stops working because inside the AuthorizationServerConfigurerAdapter class, AuthorizationServerSecurityConfigurer is used, which depends on javax.servlet.Filter , but there are no servlet filters in the WebFlux application.

Also, AuthorizationServerEndpointsConfigurer expects initialization using UserDetailsService (old inactive api) does not respond UserDetailsRepository

Is it possible to use oauth2 in the current WebFlux application, if so, you can show this example.

thanks

+14
spring-boot spring-security spring-security-oauth2 spring-webflux
source share
2 answers
0
source share

Spring Security has not yet implemented webflux support on the authorization server.

they currently have support for the webflux resource server, like the other answers mentioned. However, they mention here that they work on the authorization server and, based on this, it should be soon:

Spring Security 5 currently supports OAuth 2.0 with new client support. It is also planned to provide support for the Resource Server by mid-2018 and the Authorization Server by the end of 2018 or early 2019. Our goal is to provide enhanced support for OAuth 2.0 Core and Extensions, OpenID Connect 1.0, as well as signing and encrypting Javascript objects. (JOSE).

source: https://spring.io/blog/2018/01/30/next-generation-oauth-2-0-support-with-spring-security

so while we are stuck on a servlet OAuth2 server, which, if you use JWT tokens, should be good enough if you ask me.

Hooray!

0
source share

All Articles