Commit Graph

8 Commits

Author SHA1 Message Date
Hannes Küttner 7e675a0b86
Fix BadSignature exception handling in SessionMiddleware (#1264) 2021-08-14 15:38:50 +01:00
Thomas Grainger d222b87cb4
TestClient accepts backend and backend_options as arguments to constructor (#1211)
as opposed to ClassVar assignment 

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
Co-authored-by: Jordan Speicher <uSpike@users.noreply.github.com>
2021-06-28 21:36:13 +01:00
Mahmoud Hossam 5ee04ef9b1
Make session cookie use ASGI root path (#1147)
* Make session cookie use ASGI root path

* Check if ASGI root_path exists before using it

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Remove comment

* Add test

Co-authored-by: Mahmoud Hanafy <mahmoud.hanafy@retresco.de>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-03-12 12:49:52 +00:00
Pierre Vanliefland 24ac0b44fe Session cookie expires (#326)
* Set Max-Age on session cookies

* Format max-age as int
2019-01-18 12:59:27 +00:00
Igor Nehoroshev eb316509b5 Add security flags to session cookie (#276)
* Add security flags to session cookie

Flags: Secure, HttpOnly and SameSite=lax

* Remove Secure flag

* Add options for security flags in SessionMiddleware

* Add tests for secure session

* Lint files that Travis would like to reformat

Only related to pull request

* Return space between imports

* Add documentation for session security flags options

* Format default values
2018-12-17 16:33:41 +00:00
Jesse Braham a7e0af0a98 Implement session expiry with configurable maximum age (#186)
* Set a maximum age for sessions

* Test session expiry for full coverage

* Fix mypy error

* Handle old-style sessions (ie. no timestamp)
2018-11-08 11:59:27 +00:00
Tom Christie 244916e1de
Support clearing sessions (#158)
* Use isort for consistent import ordering

* Add SessionMmiddleware support

* Add SessionMiddleware support

* Support clearing sessions

* Version 0.6.2
2018-10-29 16:43:40 +00:00
Tom Christie 87da226f1c
Session middleware (#157)
* Use isort for consistent import ordering

* Add SessionMmiddleware support

* Add SessionMiddleware support
2018-10-29 16:16:51 +00:00