Updated inconsistent value of scope parameter

For explicit unscoped authentication, the keystome server
specifies the scope parameter value as 'unscoped'. However
keystoneauth1 initialises it to {'unscoped': {}}. This
patch removes this inconsistency.

Updated the corresponding test for unscoped request which
checks the scope parameter in auth to match the 'unscoped'
string.

Partial-Bug #1637682

Change-Id: I1c9d89fd86773f4acecbefcdad4dca6cff16b58d
This commit is contained in:
Samriddhi 2017-04-03 14:42:37 +05:30
parent a368b2ca37
commit d0cdc355a4
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class Auth(BaseAuth):
elif self.trust_id:
body['auth']['scope'] = {'OS-TRUST:trust': {'id': self.trust_id}}
elif self.unscoped:
body['auth']['scope'] = {'unscoped': {}}
body['auth']['scope'] = 'unscoped'
# NOTE(jamielennox): we add nocatalog here rather than in token_url
# directly as some federation plugins require the base token_url

View File

@ -550,7 +550,7 @@ class V3IdentityPlugin(utils.TestCase):
self.assertEqual(token.user_id, ident['password']['user']['id'])
self.assertEqual(password, ident['password']['user']['password'])
self.assertEqual({}, body['auth']['scope']['unscoped'])
self.assertEqual('unscoped', body['auth']['scope'])
def test_unscoped_with_scope_data(self):
a = v3.Password(self.TEST_URL,