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
This commit is contained in:
Matthias Runge
2015-08-20 13:50:36 +02:00
parent a500e418d8
commit aed28851b9

View File

@@ -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