You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used https://oauthdebugger.com and Postman to narrow down my specific issue to our partner's provider OAuth2 implementation only seems to issue access tokens if the client credentials are sent as: Authorization: Basic <credentials>
With <credentials> being in the form of a base64 string.
E.g. echo -n $client_id:$client_secret | base64
Current Behavior
Although the logs shows that an authorization code is successfully being passed. This results in a 401 error while requesting the --redeem-url(/oauth/token) endpoint.
I've tried other middleware projects with the same result. Which leads me to believe that their implementation is not up to spec?RFC 6749 I've tried other middleware projects with the same result.
The golang OAuth2 library that his project uses supports this via the AuthStyle param. Which represents how requests for tokens are authenticated to the server.
Basic auth pattern of instead providing client credentials in the authorization header, per RFC 6749
I used https://oauthdebugger.com and Postman to narrow down my specific issue to our partner's provider OAuth2 implementation only seems to issue access tokens if the client credentials are sent as:
Authorization: Basic <credentials>
With
<credentials>
being in the form of a base64 string.E.g.
echo -n $client_id:$client_secret | base64
Current Behavior
Although the logs shows that an authorization code is successfully being passed. This results in a 401 error while requesting the
--redeem-url
(/oauth/token)
endpoint.I've tried other middleware projects with the same result.
Which leads me to believe that their implementation is not up to spec?RFC 6749 I've tried other middleware projects with the same result.Possible Solution
Using
curl
with the authorization code above and sending the client credentials asBasic Auth Header
:I'm able to successfully get an
access_token
The golang OAuth2 library that his project uses supports this via the AuthStyle param. Which represents how requests for tokens are authenticated to the server.
https://pkg.go.dev/golang.org/x/oauth2#AuthStyle
Steps to Reproduce (for bugs)
Context
If there a configuration option that I'm missing? I'm also open to just creating my own custom provider but I don't have much experience with golang.
Thanks,
Your Environment
traefik-forward-auth v2.2.0
Traefik version 2.7.1
The text was updated successfully, but these errors were encountered: