Commit ab3589a4 authored by ale's avatar ale

fix Signer.encode() to take an argument

parent eb766709
...@@ -169,8 +169,7 @@ class Signer(object): ...@@ -169,8 +169,7 @@ class Signer(object):
self.l.signer = itsdangerous.URLSafeTimedSerializer(self.secret, salt='cn') self.l.signer = itsdangerous.URLSafeTimedSerializer(self.secret, salt='cn')
return self.l.signer return self.l.signer
def encode(self): def encode(self, cn):
cn = str(uuid.uuid4())
return self._signer().dumps(cn) return self._signer().dumps(cn)
def decode(self, token): def decode(self, token):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment