-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify customizing ReactiveOAuth2AccessTokenResponseClient to workaround urlencoding of oauth clientid/secrets #10042
Comments
@vboulaye thanks for the suggestion. It is indeed tough to customize this behavior on the reactive side. There seem to be two sides to this issue:
I think I have an answer for 1. We should probably take that half over to stackoverflow. Would you mind opening that question and linking it from here? I'll be happy to post what I have so far. As for number 2, I'll keep this as an open enhancement request, and we can look into adding a Would you be interested in submitting a PR for that? |
Hi, I'll try to prepare a PR in the coming days. Thanks for your help |
@vboulaye Any chance you've had time to look into a change for this? No problem if not. |
Closing in favor of gh-10130 which is more specific around customizing headers of the request. |
Hi, sorry for the late reply, I was just looking at this again today. |
@vboulaye no problem, the new issue I opened is where we can discuss it. I'll post some thoughts for you. |
Expected Behavior
Hello,
This is kind of a follow up to #10018.
While trying to upgrade to spring security 5.5.1, I found out that the oauth2 clientId and secret are now URL encoded in
AbstractWebClientReactiveOAuth2AccessTokenResponseClient
which my token provider does not support.I understand this is seen as a bug fix from your side #9610), but in my case I cannot make the token provider change its behavior easily.
So I tried to find a way to work around this.
The documentation link provided in the previous issue does not seem to apply when you use a WebClient configuration (which is my case).
In order to workaround the clientid/secret encoding I had to copy most of the existing code from
AbstractWebClientReactiveOAuth2AccessTokenResponseClient
to customize theWebClientReactiveClientCredentialsTokenResponseClient
because most of it has private/default visibility.I'd like to know if there is a better way to do this, or if you could provide one ?
(Otherwise I'll have to try my luck and get a secret with only url-compliant characters!)
Current Behavior
Here is what I ended up doing, just to remove the commented url encoding call:
Context
I am using spring security to call a Oauth2 resource using a WebClient.
And I'd like to upgrade it to the latest version.
It is working with version 5.4.2.
The text was updated successfully, but these errors were encountered: