prelim update to docs

This commit is contained in:
adamscmRH
2018-02-23 12:42:44 -05:00
parent 2911dec324
commit 87350e1014
5 changed files with 126 additions and 21 deletions

View File

@@ -51,8 +51,8 @@ class LoggedOAuth2Authentication(OAuth2Authentication):
user, token = ret
username = user.username if user else '<none>'
logger.debug(smart_text(
u"User {} performed a {} to {} through the API using OAuth token {}".format(
username, request.method, request.path, user
u"User {} performed a {} to {} through the API using OAuth token {}.".format(
username, request.method, request.path, token.pk
)
))
setattr(user, 'oauth_scopes', [x for x in token.scope.split() if x])

View File

@@ -128,8 +128,6 @@ Strict-Transport-Security: max-age=15768000
{"access_token": "9epHOqHhnXUcgYK8QanOmUQPSgX92g", "token_type": "Bearer", "expires_in": 36000, "refresh_token": "jMRX6QvzOTf046KHee3TU5mT3nyXsz", "scope": "read"}
```
## Verify by introspecting the access token:
>> Need to fill in Introspection Example in the docs here #TODO: Add Introspection
## Refresh an existing access token
Suppose we have an existing access token with refresh token provided:
@@ -146,7 +144,7 @@ Suppose we have an existing access token with refresh token provided:
"scope": "read write"
}
```
`/api/o/token/` endpoint is used for refreshing access token:
The `/api/o/token/` endpoint is used for refreshing access token:
```bash
curl -X POST \
-d "grant_type=refresh_token&refresh_token=AL0NK9TTpv0qp54dGbC4VUZtsZ9r8z" \

View File

@@ -16,7 +16,6 @@ from awx.api.views import (
UserAccessList,
OAuth2ApplicationList,
OAuth2TokenList,
OAuth2AuthorizedTokenList,
OAuth2PersonalTokenList,
UserAuthorizedTokenList,
)