Permalink
Browse files

reset token after generating xml

  • Loading branch information...
1 parent 075e305 commit a6ba3586011f177f5adbde91cf76a2888e1977a2 @suvit committed Jan 14, 2013
Showing with 6 additions and 1 deletion.
  1. +1 −1 suds_passworddigest/__init__.py
  2. +5 −0 suds_passworddigest/token.py
View
2 suds_passworddigest/__init__.py
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -
-VERSION = '0.1.1'
+VERSION = '0.1.2'
View
5 suds_passworddigest/token.py
@@ -21,6 +21,10 @@ def setcreated(self, *args, **kwargs):
UsernameToken.setcreated(self, *args, **kwargs)
self.created = str(UTC(self.created))
+ def reset(self):
+ self.nonce = None
+ self.created = None
+
def generate_digest(self):
if self.nonce is None:
self.setnonce()
@@ -57,4 +61,5 @@ def xml(self):
n.setText(self.created)
root.append(n)
+ self.reset()
return root

0 comments on commit a6ba358

Please sign in to comment.