[web2py] Re: Problem with basic auth

2010-12-29 Thread Adi
Sorry for the late response. I tried putting print statements in this method, but I don't see anything on the console. Is there an option while starting web2py to enable this? On Dec 15, 10:53 pm, mdipierro wrote: > Hmmm... look into gluon/tools.py > >     def basic(self): >         if not self.s

[web2py] Re: Problem with basic auth

2010-12-15 Thread mdipierro
Hmmm... look into gluon/tools.py def basic(self): if not self.settings.allow_basic_login: return False basic = self.environment.request.env.http_authorization if not basic or not basic[:6].lower() == 'basic ': return False (username, pass

Re: [web2py] Re: Problem with basic auth

2010-12-15 Thread Aditya Sahay
But these methods will not log in a user if provided with username and password. The objective is to log in. On 15-Dec-2010, at 10:55 PM, mdipierro wrote: > you can also do: > > logged_in = 'auth' in globals() and auth.user > > > > On Dec 15, 11:12 am, Martín Mulone wrote: >> This is my me

[web2py] Re: Problem with basic auth

2010-12-15 Thread mdipierro
you can also do: logged_in = 'auth' in globals() and auth.user On Dec 15, 11:12 am, Martín Mulone wrote: > This is my method: > > def is_user_logged_in(): >     logged_in=False >     if 'auth' in globals(): >         if auth.is_logged_in(): >             logged_in=True > >     return logged_in