summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-04-22 14:24:13 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-04-22 14:24:13 (GMT)
commitae7ba50a19de93fcbc53eb766d9d68a8d7c7b439 (patch)
tree6a9d20148e91ce890041a329b1d307ca2f772ded
parente14ef39ed86f8babd565651ce664bbd8855276b2 (diff)
downloadauthentic2-idp-ltpa-ae7ba50a19de93fcbc53eb766d9d68a8d7c7b439.zip
authentic2-idp-ltpa-ae7ba50a19de93fcbc53eb766d9d68a8d7c7b439.tar.gz
authentic2-idp-ltpa-ae7ba50a19de93fcbc53eb766d9d68a8d7c7b439.tar.bz2
middleware: only create LTPA cookie on login and homepage
-rw-r--r--authentic2_idp_ltpa/middleware.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/authentic2_idp_ltpa/middleware.py b/authentic2_idp_ltpa/middleware.py
index 0c10bcb..48bec85 100644
--- a/authentic2_idp_ltpa/middleware.py
+++ b/authentic2_idp_ltpa/middleware.py
@@ -2,7 +2,7 @@ from . import views
class LTPAMiddleware(object):
def process_response(self, request, response):
- if not 'logout' in request.path:
+ if request.path == '/' or request.path == '/login/':
views.add_ltpa_token_to_response(request, response)
return response