No option to set Basic auth clientcredentials in the token request
I am no finding way to set basic auth in the token request Here is the sample CURL req
curl --location --request POST 'https://<domain.com>/OAuthToken/as/token.oauth2'
--header 'Authorization: Basic <Basic auth>'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'client_id=<client_id>'
--data-urlencode 'client_secret=<client_secret>'
--data-urlencode 'grant_type=client_credentials'
How can I create token req in golang/oauth2/clientcredentials with Basic auth
https://github.com/golang/oauth2/tree/master/clientcredentials
@prakashettigar You really don't need to set authorization headers when requesting oauth2 tokens . They are rather needed when you want to access resources on the resource server . Additionally ,check out https://github.com/golang/oauth2/blob/master/oauth2.go on how to use the PasswordCredentials grant type to convert a resource owner username and password pair into a token.