我正在尝试使用外部 CAS 来验证用户。
我用它来完成任务:
auth = Auth(db, cas_provider = 'https://some_url')
当访问 URL 时http://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'
我希望将用户重定向到“cas_provider”url 来授权用户,然后返回到应用程序......
任何帮助都会很有帮助,即使它是一个 django 或任何 web 框架解决方案,都可以帮助解决这个问题......
附言:我可以通过编辑使用 Ldap 外部服务器成功地对客户端进行身份验证auth.login_method
,但我真的被 cas 身份验证重定向困住了……