Open RagunathInGIT opened 1 year ago
I would like to fix it and submit it for Hackathon 2022. Can you please let me know which repository I need to fork and create pull request?
Current Documentation :
There are no examples under client credentials flow to the various ways of how we can call the "/oauth2/token" to get the access_token when Kong acts as an IDP.
https://docs.konghq.com/hub/kong-inc/oauth2/
Expected Documentation :
Below are the various ways we can consume "/oauth2/token" endpoint the retrieve the access_token.
curl --location --request POST 'https://XXXX/v1/oauthprovider/oauth2/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=XXXX' \ --data-urlencode 'client_secret=XXXX' \ --data-urlencode 'grant_type=client_credentials'
curl --location --request POST 'https://XXXX/v1/oauthprovider/oauth2/token' \ --header 'Content-Type: application/json' \ --data-raw '{ "client_id": "XXXXX", "client_secret": "XXXX", "grant_type": "client_credentials" }'
curl --location --request POST 'https://XXXX/v1/oauthprovider/oauth2/token?client_id=XXXX&client_secret=XXXX&grant_type=client_credentials'
Where is the problem?
https://docs.konghq.com/hub/kong-inc/oauth2/
What happened?
I dont see documentation of various ways of calling "/oauth2/token" call for client_credentials flow.
What did you expect to happen?
In Client credentials flow, there is a provision to make "oauth2/token" call by passing the client ID, client secret and grant_type as query param or a JSON body along with usual way of sending it in URL-encoded way.
Code of Conduct and Community Expectations