aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-08-14 22:06:01 +0200
committerMichał Górny <mgorny@gentoo.org>2013-08-14 22:06:01 +0200
commit5bcd171625309ea46ea5a106bf1af92d3e2f27b9 (patch)
tree826db9e47357c0cd0d891c69eb75b0c062a34130 /okupy/accounts
parentOpenID: add 'auto logout' option. (diff)
downloadidentity.gentoo.org-5bcd171625309ea46ea5a106bf1af92d3e2f27b9.tar.gz
identity.gentoo.org-5bcd171625309ea46ea5a106bf1af92d3e2f27b9.tar.bz2
identity.gentoo.org-5bcd171625309ea46ea5a106bf1af92d3e2f27b9.zip
OpenID: always enable auto-logout for SSL cert auth.
Diffstat (limited to 'okupy/accounts')
-rw-r--r--okupy/accounts/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/okupy/accounts/views.py b/okupy/accounts/views.py
index ed243e5..691f106 100644
--- a/okupy/accounts/views.py
+++ b/okupy/accounts/views.py
@@ -219,6 +219,12 @@ def ssl_auth(request):
# the data to the original session and preferably flush the new one.
session = SessionStore(session_key=session_id)
session.update(request.session)
+
+ # always logout automatically from SSL-based auth
+ # it's easy enough to log back in anyway
+ if 'openid_request' in session:
+ session['auto_logout'] = True
+
session.save()
request.session.flush()
return redirect(next_uri)