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
(cherry picked from commit aed28851b9)
This commit is contained in:
Matthias Runge 2015-08-20 13:50:36 +02:00
parent 758122191f
commit 285e416748
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,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