I\'m trying to add OAuth2 to WebFlux and can\'t find any working example.
To Implement own Authorization Server I use such code:
@EnableAuthorizationServ
It's implemented now, here the reference to the sample code:
https://github.com/spring-projects/spring-security/tree/master/samples/boot/oauth2login-webflux
Authorization server webflux support is yet to be implemented by the spring security team.
currently they have the resource server webflux support as the other answers mentioned. However, they mention here that they are working on Authorization server and based on this, it should be out soon:
The OAuth 2.0 support is currently underway in Spring Security 5 with new Client support. The plan is to also provide support for Resource Server by mid-2018 and Authorization Server by the end of 2018 or early 2019. Our goal is to provide extensive support for OAuth 2.0 Core and Extensions, OpenID Connect 1.0, and Javascript Object Signing and Encryption (JOSE).
source: https://spring.io/blog/2018/01/30/next-generation-oauth-2-0-support-with-spring-security
so for now we are stuck with the servlet OAuth2 server which if you use JWT tokens should be good enough if you ask me.
Cheers!