summaryrefslogtreecommitdiff
path: root/openid/association.py
diff options
context:
space:
mode:
authorKevin Turner <kevin@janrain.com>2006-08-30 21:56:58 +0000
committerKevin Turner <kevin@janrain.com>2006-08-30 21:56:58 +0000
commit264fa644cab95ef641f94b9a00d507f3bb8964a8 (patch)
tree2e50b567ba15cf18fac1726ca16c66966814e00e /openid/association.py
parent3f0a254d8ecb5e636e071ec3b70203e9d435fce5 (diff)
downloadopenid-264fa644cab95ef641f94b9a00d507f3bb8964a8.tar.gz
[project @ association.Association.signDict: method removed, use getMessageSignature instead [API]]
Diffstat (limited to 'openid/association.py')
-rw-r--r--openid/association.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/openid/association.py b/openid/association.py
index a89f796..de51347 100644
--- a/openid/association.py
+++ b/openid/association.py
@@ -407,34 +407,14 @@ class Association(object):
return mac(self.secret, kv)
- def signDict(self, fields, data, prefix='openid.'):
- """
- Generate a signature for some fields in a dictionary
-
-
- @param fields: The fields to sign, in order
-
- @type fields: sequence of str
-
-
- @param data: Dictionary of values to sign
-
- @type data: {str:str}
+ def getMessageSignature(self, message):
+ """Return the signature of a message with a signed list
@return: the signature, base64 encoded
@rtype: str
"""
- pairs = []
- for field in fields:
- pairs.append((field, data.get(prefix + field, '')))
-
- return oidutil.toBase64(self.sign(pairs))
-
- def getMessageSignature(self, message):
- """Return the signature of a message with a signed list
- """
pairs = self._makePairs(message)
return oidutil.toBase64(self.sign(pairs))