diff options
author | Stuart McLaren <stuart.mclaren@hp.com> | 2016-03-14 14:28:42 +0000 |
---|---|---|
committer | Stuart McLaren <stuart.mclaren@hp.com> | 2016-03-15 16:26:31 +0000 |
commit | 1d0cb6812bea8f72235db927c598633d6bf97162 (patch) | |
tree | a7ae17e805f017b1b8539e415fd78e1ee3924e12 /keystoneclient/auth | |
parent | c2d5fce3fc7f3de26f08240eaad51d57e214d526 (diff) | |
download | python-keystoneclient-1d0cb6812bea8f72235db927c598633d6bf97162.tar.gz |
Allow seeing full token response when debug enabled
In many situations it can be useful to see the full token response.
Print v3 token response when in debug mode. This will allow the
reponse to be seen when '--debug' is specified with the openstack CLI:
{
"token": {
"methods": [
"password"
],
"roles": [
{
"id": "93bff41cabda4def87cc9d83aaaa7479"
"name": "Member"
},
.
.
.
Change-Id: I9ec39ceed122a79bbaaef429750e1d2e8401297d
Closes-bug: 1556977
Diffstat (limited to 'keystoneclient/auth')
-rw-r--r-- | keystoneclient/auth/identity/v3/base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/keystoneclient/auth/identity/v3/base.py b/keystoneclient/auth/identity/v3/base.py index 510fa66..d82c289 100644 --- a/keystoneclient/auth/identity/v3/base.py +++ b/keystoneclient/auth/identity/v3/base.py @@ -11,6 +11,7 @@ # under the License. import abc +import json import logging from oslo_config import cfg @@ -190,6 +191,7 @@ class Auth(BaseAuth): authenticated=False, log=False, **rkwargs) try: + _logger.debug(json.dumps(resp.json())) resp_data = resp.json()['token'] except (KeyError, ValueError): raise exceptions.InvalidResponse(response=resp) |