1 From 9fa6a3d6b7747f91631a10ce8300bf0f09ce4e53 Mon Sep 17 00:00:00 2001
2 From: Matthias Runge <mrunge@redhat.com>
3 Date: Thu, 20 Aug 2015 13:50:36 +0200
4 Subject: [PATCH] initialize the hasher for unscoped token
6 Using PKI tokens results in an empty
7 projects list in horizon and a 403 error from
10 Change-Id: If6853343125112340e447e760ee7d997e6e7384f
13 (cherry picked from commit aed28851b933a04dffcff70674f7afad84cb2d57)
15 openstack_auth/user.py | 1 +
16 1 file changed, 1 insertion(+)
18 diff --git a/openstack_auth/user.py b/openstack_auth/user.py
19 index 9310aa7..521fdea 100644
20 --- a/openstack_auth/user.py
21 +++ b/openstack_auth/user.py
22 @@ -91,6 +91,7 @@ class Token(object):
23 hasher.update(self.id)
24 self.id = hasher.hexdigest()
25 # If the scoped_token is long, then unscoped_token must be too.
26 + hasher = hashlib.new(algorithm)
27 hasher.update(self.unscoped_token)
28 self.unscoped_token = hasher.hexdigest()
29 self.expires = auth_ref.expires