I've found another posting that worked for me:

Example: 
curl -X POST \
  https://www.mydomain.com/auth/oauth2.0/accessToken \
  -H 'authorization: Basic myEncodedCredentials' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=myClientId'


On Monday, September 16, 2019 at 8:52:40 AM UTC-5, Pablo Vidaurri wrote:
>
> I'm trying to request a token for grant type of client_credentials. If I 
> put all my parameters as query parameters it get back a token:
>
> https://www.mydomain.com/auth/oauth2.0/accessToken?grant_type=client_credentials&client_id=myClient&client_secret=
>  
> <https://www.nxp.com/auth/oauth2.0/accessToken?grant_type=client_credentials&client_id=docstore-prod&client_secret=uz$@VJrS8rw2Mrm8zQ7691>
> mySecret  
>
> But the cas doc says not to pass in sensitive info (client, secret, 
> refresh token) in GET method and to use POST instead. I have not been able 
> to get post to work. I've tried using Basic Authorization using 
> clientId:secret with body having grant_type=client_credentails but get back 
> 400.
>
> Any suggestions?
> -psv
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/a2b5e029-2acb-462a-af13-6a6dc429e90c%40apereo.org.

Reply via email to