summaryrefslogtreecommitdiff
path: root/keystoneclient/utils.py
diff options
context:
space:
mode:
authorHenry Nash <henryn@linux.vnet.ibm.com>2012-11-12 19:40:21 +0000
committerHenry Nash <henryn@linux.vnet.ibm.com>2012-11-12 19:40:21 +0000
commit7920899af119d1697c333d202ca3272f167c19b0 (patch)
tree2193f585d858e23bfce292f0e7e21c1598ec5b65 /keystoneclient/utils.py
parentf617b09874046a0f56f6342638cc8444ed719022 (diff)
downloadpython-keystoneclient-7920899af119d1697c333d202ca3272f167c19b0.tar.gz
Add auth-token code to keystoneclient, along with supporting files
This step in the process duplicates the auth-token code to keystoneclient but, for the moment, leaves a copy in its origional location in keystone. Testing for auth-token is also copied across, as is the cms support file. Although no other project will yet pick up the code here in the client, since the paste.ini files haev not yet been updated, it would work if anyone did reference it. Once the client code is in, the next step is to update all the other project paste files, and then finally retire the code from keystone. Change-Id: I88853a373d406020d54b61cba5a5e887380e3b3e
Diffstat (limited to 'keystoneclient/utils.py')
-rw-r--r--keystoneclient/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/keystoneclient/utils.py b/keystoneclient/utils.py
index 36ec41b..225afe7 100644
--- a/keystoneclient/utils.py
+++ b/keystoneclient/utils.py
@@ -1,4 +1,5 @@
import uuid
+import hashlib
import prettytable
@@ -114,3 +115,9 @@ def string_to_bool(arg):
return arg
return arg.strip().lower() in ('t', 'true', 'yes', '1')
+
+
+def hash_signed_token(signed_text):
+ hash_ = hashlib.md5()
+ hash_.update(signed_text)
+ return hash_.hexdigest()