From aed28851b933a04dffcff70674f7afad84cb2d57 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Thu, 20 Aug 2015 13:50:36 +0200 Subject: [PATCH] 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 --- openstack_auth/user.py | 1 + 1 file changed, 1 insertion(+) 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