1

I am trying to use an external CAS to authenticate users.

I use this to do the task:

auth = Auth(db, cas_provider = 'https://some_url')    

And when accessing the url http://127.0.0.1:8000/app/default/user/login

I get the following error:

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'

I would want the user to be redirected to the "cas_provider" url to authoruze the user which then get back to the app...

Any help would be bless, even if it is a django or whatever web framawork solution, that could help to figure this out ...

ps: I could sucessfully authenticate clients using an Ldap external server by editing the auth.login_method, but i am really stuck with the cas authentication redirection ...

dtrckd
  • 111
  • 4

0 Answers0