How to get OAuth token from CloudFoundry

前端 未结 3 1471
独厮守ぢ
独厮守ぢ 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:24

    If you have already logged in using cf, you will find that the authorization token is stored in ~/.cf/config.json under they key "AccessToken". You can easily pull it out of there.

    If you need to get the Authorization bearer token yourself without using the cf CLI you can follow the instructions at https://www.ng.bluemix.net/docs/#services/AppUserRegistry/index.html#appuserregistry . You can also export CF_TRACE=true and then do a cf login yourself and watch the REST dance the CLI does with the server to get the authorization token.

提交回复
热议问题