Thank you for the reply, does basic auth return a token? it seems that basic auth works on that time but isnt persistent, i mean if i try to open another link requiring authentication i get redirected to the login.
in a git repo of an android app using w2p as a server i saw the guy connected using this route: final String url = initial + "/default/login.json?userid=" + username + "&password=" + password; but i think that was a custom function. On Thursday, April 20, 2017 at 8:56:43 PM UTC+2, Dave S wrote: > > > > On Thursday, April 20, 2017 at 6:30:15 AM UTC-7, Oasis Agano wrote: >> >> Can someone share the code on the controller side of authentication >> inside web2py and how to make co exist with the default authentication. >> >> The web2py side can be handled with a decorator if Basic Auth is > sufficient; see > > <URL: > http://web2py.com/books/default/chapter/29/09/access-control#Access-Control-and-Basic-Authentication > > > > The android side would be a GET with the (Base64 encoded) credentials. > Base64 isn't encryption, but if you're using HTTPS the transport provides > the encryption. > > You can also do other forms of login (two factor, CAS, etc) as one step , > issue a JWT, and then use the JWT in the [REST] API calls. See the JWT > intro in gluon/tools.py. > > /dps > > > > >> On Tuesday, April 18, 2017 at 12:31:38 AM UTC+2, Dave S wrote: >>> >>> >>> >>> On Monday, April 17, 2017 at 1:20:20 PM UTC-7, Oasis Agano wrote: >>>> >>>> No extra modifications inside the web2py controller? I want to >>>> authenticate users available in a web2py application through an android app >>>> >>>> >>> I don't know of anything particularly unusual, but I haven't done >>> android apps since JellyBean. There's a package that seems to be popular >>> around here to run Javascript in a framework on the phone, but the normal >>> server-side tools should be fine. Maybe returning JSON. Web2py supports >>> that out of the box, and also supports REST apis, and as mentioned in the >>> other thread has support for JWT. The web2py auth mechanisms are fairly >>> flexible. >>> >>> /dps >>> >>> >>> >>>> On Monday, April 17, 2017 at 10:07:24 PM UTC+2, Dave S wrote: >>>>> >>>>> >>>>> >>>>> On Monday, April 17, 2017 at 4:08:29 AM UTC-7, Oasis Agano wrote: >>>>>> >>>>>> Can Someone write a slice on how to connect an android app to a >>>>>> web2py server, using java and py >>>>>> >>>>> >>>>> >>>>> Android end just has to do GET and POST, innit? >>>>> >>>>> /dps >>>>> >>>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

