diff options
author | Chmouel Boudjnah <chmouel@chmouel.com> | 2012-05-22 15:01:38 +0000 |
---|---|---|
committer | Chmouel Boudjnah <chmouel@chmouel.com> | 2012-05-22 15:03:15 +0000 |
commit | daf395b5e85bfa1f91612dda7030b3089ca4da7a (patch) | |
tree | 2983f386fc8607cc658028d7ca595ce57af03d0c /keystone/middleware | |
parent | 33d107aa1d3e1aa2c188f9df7338a1e7d97a4ed2 (diff) | |
download | keystone-daf395b5e85bfa1f91612dda7030b3089ca4da7a.tar.gz keystone-daf395b5e85bfa1f91612dda7030b3089ca4da7a.tar.xz keystone-daf395b5e85bfa1f91612dda7030b3089ca4da7a.zip |
Use X_USER_NAME and X_ROLES headers.
- Don't use deprecated headers X_USER and X_ROLE but the newest one
X_USER_NAME and X_ROLES.
- Fixes bug 999447.
Change-Id: I12752c7668863cbb47ee4b6e484cc494133443e8
Diffstat (limited to 'keystone/middleware')
-rw-r--r-- | keystone/middleware/swift_auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/keystone/middleware/swift_auth.py b/keystone/middleware/swift_auth.py index 19f8cab9..08c00909 100644 --- a/keystone/middleware/swift_auth.py +++ b/keystone/middleware/swift_auth.py @@ -125,9 +125,9 @@ class SwiftAuth(object): if environ.get('HTTP_X_IDENTITY_STATUS') != 'Confirmed': return roles = [] - if 'HTTP_X_ROLE' in environ: - roles = environ['HTTP_X_ROLE'].split(',') - identity = {'user': environ.get('HTTP_X_USER'), + if 'HTTP_X_ROLES' in environ: + roles = environ['HTTP_X_ROLES'].split(',') + identity = {'user': environ.get('HTTP_X_USER_NAME'), 'tenant': (environ.get('HTTP_X_TENANT_ID'), environ.get('HTTP_X_TENANT_NAME')), 'roles': roles} |