Key error when auth in standalone mode
Fix a key error caused from the response of authing in stand alone mode. The keystone docs indicate that the schema for a response user name is ['user']['name'] rather than ['user']['username']. Change-Id: I9ac94feeef8f9f2dedaa3842f64a3491e701e199
This commit is contained in:
parent
56d5fb9f83
commit
70990d3106
@ -74,7 +74,7 @@ class KeystonePasswordAuthProtocol(object):
|
||||
tenant_id = token_info['token']['tenant']['id']
|
||||
tenant_name = token_info['token']['tenant']['name']
|
||||
user_id = token_info['user']['id']
|
||||
user_name = token_info['user']['username']
|
||||
user_name = token_info['user']['name']
|
||||
roles = ','.join(
|
||||
[role['name'] for role in token_info['user']['roles']])
|
||||
service_catalog = token_info['serviceCatalog']
|
||||
|
@ -45,7 +45,7 @@ TOKEN_RESPONSE = {
|
||||
},
|
||||
'user': {
|
||||
'id': 'user_id1',
|
||||
'username': 'user_name1',
|
||||
'name': 'user_name1',
|
||||
'roles': [
|
||||
{'name': 'role1'},
|
||||
{'name': 'role2'},
|
||||
|
Loading…
Reference in New Issue
Block a user