spring-oauth2-client-credentials-webclient icon indicating copy to clipboard operation
spring-oauth2-client-credentials-webclient copied to clipboard

Whe use ServletOAuth2AuthorizedClientExchangeFilterFunction?

Open simonxcheng opened this issue 4 years ago • 2 comments
trafficstars

Helloworldless,

We used ServerOAuth2AuthorizedClientExchangeFilterFunction and could not get the OAuth refresh token working. So we switched to ServletOAuth2AuthorizedClientExchangeFilterFunction based on your code. I am just wondering why we need to use ServletOAuth2AuthorizedClientExchangeFilterFunction?

simonxcheng avatar Oct 13 '21 23:10 simonxcheng

The "Server" one is the reactive version. "Servlet" is the traditional, non-reactive one.

For reference:

  • Reactive: https://docs.spring.io/spring-security/site/docs/5.4.2/reference/html5/#webclient-setup
  • Servlet: https://docs.spring.io/spring-security/site/docs/5.4.2/reference/html5/#oauth2Client-webclient-servlet

helloworldless avatar Oct 15 '21 15:10 helloworldless

Thanks. I did use Reactive setup and somehow ServerOAuth2AuthorizedClientExchangeFilterFunction does not work for us. So we had to switch to Servlet setup.

simonxcheng avatar Oct 19 '21 16:10 simonxcheng