...
Expand |
---|
|
Code Block |
---|
$ curl -v -w"\n" -X GET "http://localhost:10009/token" -u cdap:bigdata |
|
Expand |
---|
|
Code Block |
---|
> curl -v -X GET "http://localhost:10009/token" -u cdap:bigdata |
|
This should return a 200 OK
response with the AccessToken
string in the response body (formatted to fit):
Code Block |
---|
{"access_token":"AghjZGFwAI7e8p65Uo7OpfG5UrD87psGQE0u0sFDoqxtacdRR5GxEb6bkTypP7mXdqvqqnLmfxOS",
"token_type":"Bearer","expires_in":86400} |
Reattempt the first command, but this time include the access_token
as a header in the request:
Code Block |
---|
GET /v3/apps "Authorization: Bearer <access_token>" |
such as (formatted to fit):
Expand |
---|
|
Code Block |
---|
$ curl -v -w"\n" -X GET "http://localhost:11015/v3/namespaces/default/apps" \ -H "Authorization: Bearer AghjZGFwAI7e8p65Uo7OpfG5UrD87psGQE0u0sFDoqxtacdRR5GxEb6bkTypP7mXdqvqqnLmfxOS" |
|
Expand |
---|
|
Code Block |
---|
> curl -v -X GET "http://localhost:11015/v3/namespaces/default/apps" ^ -H "Authorizati |
|
This should return a 200 OK
response.
...