mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 18:37:36 -02:30
fix curl example
This commit is contained in:
@@ -142,8 +142,8 @@ The most common usage of OAuth 2 is authenticating users. The `token` field of a
|
|||||||
as part of the HTTP authentication header, in the format `Authorization: Bearer <token field value>`. This _Bearer_
|
as part of the HTTP authentication header, in the format `Authorization: Bearer <token field value>`. This _Bearer_
|
||||||
token can be obtained by doing a curl to the `/api/o/token/` endpoint. For example:
|
token can be obtained by doing a curl to the `/api/o/token/` endpoint. For example:
|
||||||
```
|
```
|
||||||
curl -ku root:reverse -H "Content-Type: application/json" -X POST \
|
curl -ku <user>:<password> -H "Content-Type: application/json" -X POST \
|
||||||
-d '{"description":"Tower CLI","application":null,"scope":"read"}' \
|
-d '{"description":"Tower CLI", "application":null, "scope":"write"}' \
|
||||||
https://localhost:8043/api/v2/users/1/personal_tokens/ | python -m json.tool
|
https://localhost:8043/api/v2/users/1/personal_tokens/ | python -m json.tool
|
||||||
```
|
```
|
||||||
Here is an example of using that PAT to access an API endpoint using `curl`:
|
Here is an example of using that PAT to access an API endpoint using `curl`:
|
||||||
|
|||||||
Reference in New Issue
Block a user