How to get OAuth token from CloudFoundry

前端 未结 3 1463
独厮守ぢ
独厮守ぢ 2020-12-19 02:41

I want to get data from cloud foundry using curl, but I\'m not able to authenticate (oauth against CF). Please, could someone point me to and example how to get oauth token?

3条回答
  •  天涯浪人
    2020-12-19 03:18

    Try this. I found it in the Cloud Foundry docs: https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-APIs.rst#oauth2-token-endpoint

    curl -v -XPOST -H"Application/json" -u "cf:" --data "username=&password=&client_id=cf&grant_type=password&response_type=token" https://login.run.pivotal.io/oauth/token
    

提交回复
热议问题