comparison MoinMoin/support/werkzeug/contrib/securecookie.py @ 6129:7f12cf241d5e

update werkzeug to 0.12.1, update CHANGES
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 11 Apr 2017 22:42:23 +0200
parents 9f12f41504fc
children
comparison
equal deleted inserted replaced
6128:561b7a9c2bd9 6129:7f12cf241d5e
55 if not data: 55 if not data:
56 return SecureCookie(secret_key=SECRET_KEY) 56 return SecureCookie(secret_key=SECRET_KEY)
57 return SecureCookie.unserialize(data, SECRET_KEY) 57 return SecureCookie.unserialize(data, SECRET_KEY)
58 58
59 def application(environ, start_response): 59 def application(environ, start_response):
60 request = Request(environ, start_response) 60 request = Request(environ)
61 61
62 # get a response object here 62 # get a response object here
63 response = ... 63 response = ...
64 64
65 if request.client_session.should_save: 65 if request.client_session.should_save:
75 @cached_property 75 @cached_property
76 def client_session(self): 76 def client_session(self):
77 return SecureCookie.load_cookie(self, secret_key=COOKIE_SECRET) 77 return SecureCookie.load_cookie(self, secret_key=COOKIE_SECRET)
78 78
79 def application(environ, start_response): 79 def application(environ, start_response):
80 request = Request(environ, start_response) 80 request = Request(environ)
81 81
82 # get a response object here 82 # get a response object here
83 response = ... 83 response = ...
84 84
85 request.client_session.save_cookie(response) 85 request.client_session.save_cookie(response)