Skip to content
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

For OAuth2 Basic,I think it is better to delete AuthStyle: oauth2.AuthStyleInParams #37

Closed
xin053 opened this issue Oct 24, 2023 · 1 comment
Assignees
Labels
enhancement Enhancement request

Comments

@xin053
Copy link

xin053 commented Oct 24, 2023

https://github.com/apache/incubator-answer-plugins/blob/743ff5036d5b2b8ffa4c38c9ac8aaa380a79c648/connector-basic/basic.go#L105

if you specify oauth2.AuthStyleInParamsClientID and ClientSecret will be added as client_id and client_secret in params of the request,but if the server wants the clientID & clientSecret in a different form,such as Basic Authorization,the ConnectorReceiver will failed with connector received failed, error info: code exchange failed: oauth2: cannot fetch token: 401 Unauthorized

however, if we delete AuthStyle: oauth2.AuthStyleInParamsConnectorReceiver will first try AuthStyleInHeader such as Basic Authorization; if failed, then try AuthStyleInParams(client_id and client_secret params)

refer to: https://github.com/golang/oauth2/blob/4c91c17b32051e551fc27bdbdea4edc060b0aae5/internal/token.go#L212

@LinkinStars
Copy link
Member

Done in v1.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request
Projects
None yet
Development

No branches or pull requests

2 participants