Validate user account without login

18 views
Skip to first unread message

Antonio Salazar

unread,
Aug 26, 2016, 6:40:59 PM8/26/16
to web2py-users
I have a working application which does LDAP authentication exclusively. I'm adding a a web service that generates an access token if the user and password passed to it by JSON are valid.

I'm not sure about how to validate the account against LDAP inside the web service, but I'd really like to reuse the parent app configuration.

Antonio Salazar

unread,
Aug 26, 2016, 7:01:41 PM8/26/16
to web2py-users
Just found it in the manual. It's done with:

user = auth.login_bare(username, password)

or in my case:

login_is_valid = bool(auth.login_bare(username, password))
Reply all
Reply to author
Forward
0 new messages