mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #20687 -- Added documentation for django.core.signing API.
Thanks Baptiste Mispelon for the suggestion.
This commit is contained in:
committed by
Tim Graham
parent
63b2155919
commit
c5bc98d7e1
@@ -183,6 +183,10 @@ class TimestampSigner(Signer):
|
||||
return super(TimestampSigner, self).sign(value)
|
||||
|
||||
def unsign(self, value, max_age=None):
|
||||
"""
|
||||
Retrieve original value and check it wasn't signed more
|
||||
than max_age seconds ago.
|
||||
"""
|
||||
result = super(TimestampSigner, self).unsign(value)
|
||||
value, timestamp = result.rsplit(self.sep, 1)
|
||||
timestamp = baseconv.base62.decode(timestamp)
|
||||
|
||||
Reference in New Issue
Block a user