Updating legacy auth translation to 2.0 (bug #863661)

Change-Id: I3a31beec9a5bd0ced70c2e93e7dbdaba072b1f0c
This commit is contained in:
Dolph Mathews 2011-09-30 16:21:04 -05:00
parent 715544345d
commit 61148fbdbc
1 changed files with 2 additions and 2 deletions

View File

@ -287,11 +287,11 @@ class AuthProtocol(object):
roles.append(role_ref["name"])
try:
tenant = token_info['access']['token']['tenantId']
tenant = token_info['access']['token']['tenant']['id']
except:
tenant = None
if not tenant:
tenant = token_info['access']['user']['tenantId']
tenant = token_info['access']['user'].get('tenantId')
verified_claims = {'user': token_info['access']['user']['username'],
'tenant': tenant,
'roles': roles}