summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Runge <mrunge@redhat.com>2015-08-20 13:50:36 +0200
committerMatthias Runge <mrunge@redhat.com>2015-08-20 13:50:36 +0200
commitaed28851b933a04dffcff70674f7afad84cb2d57 (patch)
tree93528754f83ca716d2cf991610de85bb1fdec630
parenta500e418d86022ed8449b86e060548cf5f5497fc (diff)
downloaddjango_openstack_auth-aed28851b933a04dffcff70674f7afad84cb2d57.tar.gz
initialize the hasher for unscoped token
Using PKI tokens results in an empty projects list in horizon and a 403 error from keystone. Change-Id: If6853343125112340e447e760ee7d997e6e7384f Closes-Bug: #1484499 Closes-Bug: #1486745
-rw-r--r--openstack_auth/user.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/openstack_auth/user.py b/openstack_auth/user.py
index bb83022..fc63d3f 100644
--- a/openstack_auth/user.py
+++ b/openstack_auth/user.py
@@ -91,6 +91,7 @@ class Token(object):
hasher.update(self.id)
self.id = hasher.hexdigest()
# If the scoped_token is long, then unscoped_token must be too.
+ hasher = hashlib.new(algorithm)
hasher.update(self.unscoped_token)
self.unscoped_token = hasher.hexdigest()
self.expires = auth_ref.expires