For OAuth2 Basic,I think it is better to delete AuthStyle: oauth2.AuthStyleInParams
#37
Labels
enhancement
Enhancement request
AuthStyle: oauth2.AuthStyleInParams
#37
https://github.com/apache/incubator-answer-plugins/blob/743ff5036d5b2b8ffa4c38c9ac8aaa380a79c648/connector-basic/basic.go#L105
if you specify
oauth2.AuthStyleInParams
,ClientID
andClientSecret
will be added asclient_id
andclient_secret
in params of the request,but if the server wants the clientID & clientSecret in a different form,such as Basic Authorization,theConnectorReceiver
will failed withconnector received failed, error info: code exchange failed: oauth2: cannot fetch token: 401 Unauthorized
however, if we delete
AuthStyle: oauth2.AuthStyleInParams
,ConnectorReceiver
will first tryAuthStyleInHeader
such as Basic Authorization; if failed, then tryAuthStyleInParams
(client_id
andclient_secret
params)refer to: https://github.com/golang/oauth2/blob/4c91c17b32051e551fc27bdbdea4edc060b0aae5/internal/token.go#L212
The text was updated successfully, but these errors were encountered: