Creating a custom authentication method through http request by passing credentials in URL

30 views
Skip to first unread message

Oasis Agano

unread,
Apr 26, 2017, 9:46:07 AM4/26/17
to web2py-users
Hello,

I'm trying to create a method that gets credentials from the url as arguments and works as the normal login of web2py then return a token or session id.
is there a safe way of doing it.

kr
oasis

Dave S

unread,
Apr 26, 2017, 4:08:15 PM4/26/17
to web2py-users

Basic Auth as the first step, then JWT for the rest?  (for the REST?).

<URL:http://web2py.com/books/default/chapter/29/09/access-control#Access-Control-and-Basic-Authentication>

and the JWT documentation is mainly in the class declaration comments in gluon/tools.py.
(Niphlod posted some of that in the threads that introduced JWT a couple years ago.)

/dps

Anthony

unread,
Apr 26, 2017, 4:17:16 PM4/26/17
to web2py-users
Not a good idea to put login credentials in a URL -- see http://stackoverflow.com/a/3150712/440323.

Anthony

Oasis Agano

unread,
Apr 27, 2017, 5:50:47 AM4/27/17
to web2py-users
i know it is not good but cant find an easy way of authenticating my android app with w2p without creating a new login function
Reply all
Reply to author
Forward
0 new messages