Merge "Make it so federated tokens are validated on v2.0"

This commit is contained in:
Jenkins 2016-07-26 14:28:01 +00:00 committed by Gerrit Code Review
commit 8a669fabad
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,11 @@ class V2TokenDataHelper(object):
'API.')
raise exception.Unauthorized(msg)
if 'OS-FEDERATION' in v3_token['user']:
msg = _('Unable to validate Federation tokens using the version '
'v2.0 API.')
raise exception.Unauthorized(msg)
# Set user roles
user['roles'] = []
role_ids = []