xin053 opened a new issue, #37:
URL: https://github.com/apache/incubator-answer-plugins/issues/37

   
https://github.com/apache/incubator-answer-plugins/blob/743ff5036d5b2b8ffa4c38c9ac8aaa380a79c648/connector-basic/basic.go#L105
   
   if you specify `oauth2.AuthStyleInParams`,`ClientID` 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.AuthStyleInParams`,`ConnectorReceiver` 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to