commit 6bd630c882f534e3439a82a346e1652d5c2221cc
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Tue Apr 3 16:04:50 2012 +0200
drop monkey-patched support for repoze.who < 1.0.14
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
input_files/config.tmpl/config.tmpl.in | 2 +-
luci/initwrappers.py | 34 --------------------------------
2 files changed, 1 insertions(+), 35 deletions(-)
---
diff --git a/input_files/config.tmpl/config.tmpl.in
b/input_files/config.tmpl/config.tmpl.in
index 5ed192f..2717ee7 100644
--- a/input_files/config.tmpl/config.tmpl.in
+++ b/input_files/config.tmpl/config.tmpl.in
@@ -190,7 +190,7 @@ post_login_url = /post_login
post_logout_url = /post_logout
[plugin:auth_tkt]
-use = @PKGNAME@.initwrappers:auth_tkt_make_plugin
+use = repoze.who.plugins.auth_tkt:make_plugin
secret = ${app_instance_secret}
timeout = %(who.auth_tkt_timeout)s
reissue_time = 60
diff --git a/luci/initwrappers.py b/luci/initwrappers.py
index 2f58cf1..a75aa46 100644
--- a/luci/initwrappers.py
+++ b/luci/initwrappers.py
@@ -74,37 +74,3 @@ def repoze_who_make_middleware_with_config(app,
)
return app
-
-
-# This is a workaround for problem, that repoze.who < 1.0.14 cannot handle
-# "timeout" and "reissue_time" (+ "userid_checker")
parameters when passed
-# into make_plugin function of repoze.who.plugins.auth_tkt.
-#
-# The only remaining problem is that the session will not timeout after some
-# time of inactivity in case of repoze.who < 1.0.14.
-def auth_tkt_make_plugin(secret=None,
- secretfile=None,
- cookie_name='auth_tkt',
- secure=False,
- include_ip=False,
- timeout=None,
- reissue_time=None,
- userid_checker=None):
- # We can presume that this package and function exist (see setup.py).
- from repoze.who.plugins.auth_tkt import make_plugin
- try:
- return make_plugin(secret=secret,
- secretfile=secretfile,
- cookie_name=cookie_name,
- secure=secure,
- include_ip=include_ip,
- timeout=timeout,
- reissue_time=reissue_time,
- userid_checker=userid_checker)
- except TypeError:
- # Workaround for repoze.who < 1.0.14 case.
- return make_plugin(secret=secret,
- secretfile=secretfile,
- cookie_name=cookie_name,
- secure=secure,
- include_ip=include_ip)
Show replies by date