secure-cookie
secure-cookie copied to clipboard
Use itsdangerous library to sign cookie
This PR is about issue https://github.com/pallets/secure-cookie/issues/6.
The previous serialization/deserialization is still in the code, until it will be removed in a another future release.
What do you think about it? Do you see improvements to add?
Perhaps the itsdangerous
library version should be more restricted?
Is this code similar to Flask's use of ItsDangerous for the session cookie? Haven't had a chance to compare yet. If not, we should identify how it's different and why here.
The current added code for serialize()
and unserialize()
methods are based on the previous implementations (which are located in this patch in _mac_serialize()
and _mac_unserialize()
methods).
SecureCookieSessionInterface() class use classes from itsdangerous
library (BadSignature
and URLSafeTimedSerializer
) but don't have serialize()
and unserialize()
methods.
So I don't understand what needs to be compared. Could you give me some hints?