我正在尝试使用外部CAS来validation用户。
我用这个来完成这个任务:
auth = Auth(db, cas_provider = 'https://some_url')
而当访问urlhttp://127.0.0.1:8000/app/default/user/login
我得到以下错误:
web2py™ Version 2.9.11-stable+timestamp.2014.09.15.23.35.11 Traceback Traceback (most recent call last): File "web2py/gluon/restricted.py", line 224, in restricted exec ccode in environment File "web2py/applications/webuser/controllers/default.py", line 101, in <module> File "/web2py/gluon/globals.py", line 392, in <lambda> self._caller = lambda f: f() File "web2py/applications/webuser/controllers/default.py", line 63, in user form = auth() File "web2py/gluon/tools.py", line 1437, in __call__ return getattr(self, args[0])() File "gluon/tools.py", line 2511, in login cas_user = cas.get_user() File "gluon/contrib/login_methods/cas_auth.py", line 80, in get_user d[key] = self.maps[key](user) File "gluon/tools.py", line 1984, in <lambda> maps = dict((name, lambda v, n=name: v.get(n, None)) for name in AttributeError: 'str' object has no attribute 'get'
我希望用户被redirect到“cas_provider”url来授权用户,然后返回到应用程序…
任何帮助将是保佑,即使它是一个django或任何networkingframawork解决scheme,可以帮助弄清楚这一点… …
PS:我可以通过编辑auth.login_method成功地使用Ldap外部服务器来validation客户端,但是我真的被卡在CASauthenticationredirect中。