what authentication do you want to support ? web2py's default use session cookies, but you need to get to the login page and obtain one before hitting a protected page....
On Friday, October 2, 2015 at 11:06:25 PM UTC+2, Fábio Filho wrote: > > I'm sorry by my english.... > > How can i connect my android application in my web2py site using auth > authentication (@auth.requires_login)? > > I need make a secure connection between them > > for example: > > > Web2Py Side : > > @auth.requires_login() > def get_examplet(): > return "{'code':'0'}" > > > > > Android Java side: > > new Thread(){ > > @Override > public void run(){ > > Http.request("localhost:8080/mysite/controller/get_example") ; > // <---- i got a refused connection because that python line code > ("@auth.requires_login()"), > > // so of course that is expected > because i need to be logged in to make this request > > // when a remove that python line code > above ("@auth.requires_login()"), i take it perfectly .... > > } > > }.start(); > > > > How can i do this above? > > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.