I suspect your problem is that both apps connect to the same
databases.

If you use CAS youhave consumer and provider. If the two apps use the
same DB, there is no need for CAS. You use CAS because the two apps do
not have the same db. Therefore is correct for the consumer to reset
the password to null since the consumer must use the provider password
for login.

On Jul 13, 12:28 am, "Lucas D'Avila" <[email protected]> wrote:
> Hello!
> I'm making some tests with the new CAS, but at some point after login the
> user's password is reset (set to NULL in the database),
>
> I think it's because in line 1629 of Class gluon.tools.Auth (trunk version),
> the variable "cas_user [passfield] " is set as None,
> then the method "self.get_or_create_user()" is called that updates the
> password to null in database
>
> This is a bug, or i'm doing something wrong?
>
> My environment are two applications (copies of wellcome app), with the
> following models:
> *
> *
> *accounts_app/models/db.py:*
> auth_db = DAL('postgres://postgres:postgres@localhost/accounts')
> db_session = DAL('sqlite://storage.sqlite')
> session.connect(request = request, response = response, db = db_session)
>
> from gluon.tools import Auth
> auth = Auth(db = auth_db)
> auth.define_tables(username=True)
>
> *client_app/models/db.py:*
> auth_db = DAL('postgres://postgres:postgres@localhost/accounts')
> db_session = DAL('sqlite://storage.sqlite')
> session.connect(request = request, response = response, db = db_session)
>
> auth = Auth(db = auth_db, 
> cas_provider='http://localhost:8000/accounts/default/user/cas')
> auth.define_tables(username=True, migrate = False)
> auth.settings.login_form=CasAuth(globals(), urlbase = 
> "http://localhost:8000/accounts/default/user/cas";, actions=['login',
> 'validate', 'logout'])
>
> One more doubt, is correct to connect both applications on the same (auth)
> database? was the way I found to keep the permissions centralized in one
> place.
>
> --
> *Lucas D'Avila*https://github.com/lucasdavila

Reply via email to