>From web2py/gluon/contrib/login_methods/cas_auth.py
if you want to connect to a CAS version 2 JASIG Server use this:
auth.settings.login_form=CasAuth(
urlbase = "https://[Your CAS server]/cas",
actions = ['login','serviceValidate','logout'],
casversion = 2,
casusername = "cas:user")
If you look in that file in CasAuth.__init__:
def __init__(self, g=None, # g for backward compatibility ###
urlbase="https://web2py.com/cas/cas",
actions=['login', 'validate', 'logout'],
maps=dict(username=lambda v: v.get('username', v['user']),
email=lambda v: v.get('email', None),
user_id=lambda v: v['user']),
casversion=1,
casusername='cas:user'
):
The maps argument is what you want. It maps fields from the JASIG response
into fields in your auth_user table. CAS does not specify their names. Doh!
On Monday, 2 March 2015 11:56:34 UTC-6, Yusuf Kaka wrote:
>
> I've managed to get web2py to sign-on with JASIG CAS, however, none of the
> attributes are being populated on web2py. All user fields in the DB are set
> to None.
>
> Any ideas?
>
> On Monday, August 11, 2014 at 1:59:33 PM UTC+2, Tanu Mittal wrote:
>>
>> Is It possible to integrate web2py with Jasig CAS ? Also which other
>> python frameworks like Django, Flask can be integrated with Jasig CAS?
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.