[web2py] Re: CAS auto login for all apps

2011-11-11 Thread Cahya Dewanta
pepper_bg. You mean @auth.requires_login() ? Cos it works and you are 100% right about what I'm trying to describe :) Thanks! Anthony. Thanks again. It seems separating databases and using CAS is the most suitable for my system.

[web2py] Re: CAS auto login for all apps

2011-11-10 Thread pepper_bg
>I still need to click login > button right now. Just add @auth.login_required on top of the controller functions you want to auto login from in the consumers and if you are logged in at the CAS provider you will get logged in here as well (I believe this what you are describing you want to do now

[web2py] Re: CAS auto login for all apps

2011-11-10 Thread Anthony
On Wednesday, November 9, 2011 11:58:36 PM UTC-5, Cahya Dewanta wrote: > > Anthony. Just tried and indeed it works. Can I combine it with > pepper_bg's tips so I get the same behaviour? Once login will > autologin all apps if we visit them. I still need to click login > button right now. I'm n

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Anthony. Just tried and indeed it works. Can I combine it with pepper_bg's tips so I get the same behaviour? Once login will autologin all apps if we visit them. I still need to click login button right now.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
pepper_bg. I just realize like you mentioned before that I don't need CAS since I'm sharing the database. Once I set session.connect(request, response, db, masterapp='app3') it works! It even autologin to all apps once I login. No clicking login button. Once logout will logout all apps too. Somethi

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Anthony
On Wednesday, November 9, 2011 12:30:24 PM UTC-5, Cahya Dewanta wrote: > > Hello Anthony. I begin to think that I do the wrong approach for my > system. In my understanding, 3 different databases would make 3 > different user registrations. Is it? If you're using CAS, the registrations (and log

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Thank you. I'll get your directions and will post the result to inform.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread pepper_bg
> One login, one username for all. > What approach should I do then? You seem to be already on the right track: 1. Make your applications share a DB. You are already doing this auth.define_tables(migrate=False). Debug that error you are getting or post here the complete trace. 2. Make them share

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
And that's why I'm sharing the database connection. In my understanding, one registration is one database. I prefix the tables to know what tables belongs to what apps.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
pepper_bg, my project is exactly the same with your samples above except I'm using MySQL. I have 3 apps and one registration should be enough to access those all apps. I try to avoid different registrations and different logins. One login, one username for all. What approach should I do then?

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Hello Anthony. I begin to think that I do the wrong approach for my system. In my understanding, 3 different databases would make 3 different user registrations. Is it?

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread pepper_bg
Yes, the fact that your applications are sharing a DB connection already means that you don't need CAS. Can you describe what you are trying to do?

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Anthony
On Wednesday, November 9, 2011 8:44:39 AM UTC-5, Cahya Dewanta wrote: > > I've followed your sample and it works. Then I change the adapter to > MySQL. Setting up all DAL to refer to one single database. > With CAS each app should have its own db with its own Auth tables. The auth_user data from

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Thank you :) 'CAS is working properly' by my little understanding is I'm able to login to each app with one single id, though I have to manually provide credentials data once again to each app. I've followed your sample and it works. Then I change the adapter to MySQL. Setting up all DAL to refer

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread pepper_bg
>I have my CAS working properly. First, what do you mean by that? CAS works out of the box. Here is how to test the scenario *I think* you are describing: 1. From the web interface create three applications app1, app2, app3 (app1 and app2 will be consumers, app3 the CAS provider). 2. In app1 an