summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/api/openstack/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index 473071738..0b6ef8fc5 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -121,8 +121,8 @@ class AuthMiddleware(wsgi.Middleware):
req - webob.Request object
"""
ctxt = context.get_admin_context()
- user = self.auth.get_user_from_access_key(key)
- if user and user.name == username:
+ user = self.auth.get_user_from_access_key(username)
+ if user and user.secret == key:
token_hash = hashlib.sha1('%s%s%f' % (username, key,
time.time())).hexdigest()
token_dict = {}