Is there a way to set client id + secret for OAuth...
# spring
h
Is there a way to set client id + secret for OAuth2 at runtime for WebClient?
is there a way to configure this at runtime?
c
WebClient is just a reactive HTTP client, it has no idea about OAuth. You can set OAuth filters for it yourself by either implement them or using something like Spring Security oauth support (which has some ready-to-use stuff for WebClient).
h
The solution was to create a ClientRegistrationRepository and call
ClientRegistration.withRegistrationId
then configure it in code
👍 1
I had to do it this way because the OAuth2 setup needs to be dynamic instead of the usual configuration in application.properties