Possible to use CAS/Single Signon with custom auth_db?

32 views
Skip to first unread message

LoveWeb2py

unread,
Nov 22, 2014, 1:55:52 AM11/22/14
to web...@googlegroups.com
Hello,

I'm trying to use Web2py's CAS feature and database cooperation. I tried to follow this article: http://www.web2pyslices.com/slice/show/1877/single-login-by-two-different-ways

And it looks good, but what if I'm using custom authentication? The appliance found here: https://github.com/mdipierro/web2py-appliances/tree/master/PyForum2 uses custom authentication and I'm not what the best approach would be to use central authentication between two appliances.

Main appliance: Uses web2py's basic authentication
Forum Appliance: Uses custom auth here is a sample of the db.py

## Authentication Schema (3 tables)
db.define_table('auth_users',
                db.Field('auth_email', 'string', length=128, required=True),
                db.Field('auth_passwd', 'string', length=128, required=True),
                db.Field('auth_created_on', 'string', required=True),
                db.Field('auth_modified_on', 'string', required=True),
                db.Field('is_enabled', 'boolean', required=False,
                         default=True),
                migrate='auth_users.table', fake_migrate=fake_migrate)


Is CAS an option here?

Massimo Di Pierro

unread,
Nov 22, 2014, 1:21:51 PM11/22/14
to web...@googlegroups.com
If you add fields to auth_user than you can still use CAS. If you use your own authentication logic, than I cannot say without more details.

LoveWeb2py

unread,
Nov 23, 2014, 3:54:19 PM11/23/14
to web...@googlegroups.com
Hi Massimo,

So I should make appliance 1's auth_user match appliance 2?

Appliance 2 is using a custom db model (it's the forum appliance) whereas appliance 1 is the default db.auth model. Is there additional code I could show that would help?
Reply all
Reply to author
Forward
0 new messages