models/db.py
from gluon.tools import Auth,Crud, Service, prettydate
from gluon.contrib.login_methods.basic_auth import basic_auth
import datetime
crud, service = Crud(db), Service(),
auth = Auth(db)
auth.define_tables(username=True)
auth.settings.allow_basic_login = True
auth.settings.hmac_key =
But that text is preceded by:
Some times you want to implement your own logic and do "manual" user login.
This can also be done by calling the function:
user = auth.login_bare(username,password)
To me, that says you can do a manual user login by calling
auth.login_bare() (the method name is k
I copied the text from the web2py book online. It should say that they
user is then logged in. At least for me it needed to be more descriptive.
BR,
Jason
On Saturday, January 19, 2013 5:22:11 PM UTC+2, Massimo Di Pierro wrote:
>
> Where do you read that comment? login_bare does login the user
Where do you read that comment? login_bare does login the user and returns
the user record.
On Saturday, 19 January 2013 00:31:00 UTC-6, encompass wrote:
>
> The last link was the one I was looking at first. Before this post. But
> """
> login_bare returns user if the user exists and the passw
The last link was the one I was looking at first. Before this post. But
"""
login_bare returns user if the user exists and the password is valid, else
it returns False. username is the email if the "auth_user" table does not
have a "username" field.
"""
doesn't sound like I logged in a user.
>
> My current app runs with only JSON calls is there a way to make the login
> occure with JSON?
>
Did you check this?
http://www.web2py.com/books/default/chapter/29/10#Services-and-Authentication
http://www.web2py.com/books/default/chapter/29/09#Access-Control-and-Basic-Authentication
http://
6 matches
Mail list logo