<https://lh3.googleusercontent.com/--0rOdzb1tm0/VmgGeoHk3QI/AAAAAAAAF2w/hJkq2dR1k_c/s1600/login_screen.png>

Hi
I need help implementing this scenario:

user opens the android app. 
app checks if he is currently logged in. 
if not, open the login web page ( in a webview - as seen in the screenshot)
from here, new users can register.
user enter credentials.
login result (pass/fail) is used by the app logic to decide how to 
continue. 
The user SHOULD not have to see web pages outside the application (i.e. 
opening the browser)
Once the user is logged in, he updates the web2py server with the 
equivalent of c -> s :  foo(user_id, data1,data2)


   1. how can I check if user is currently logged in? I saw the session 
   cookie but not sure how to infer from it the status. Also, a user could 
   have logged in long time ago, have the cookie but the session will expire. 
   I guess something like this is needed in controllers/hello.py: ( i.e. start 
   by sending GET http://mysite/my_app/hello/logged
   @auth.requires_login()
   def logged(): return dict(message="hello logged user")
   2. I guess I don't really need the user_id field in the client side. 
   What is the proper way to get actions associated with this user? in other 
   words, each user has database updates relevant only for him.



This is similar to 
https://groups.google.com/forum/?fromgroups#!searchin/web2py/login/web2py/22hXvhMF-ws/gEb62ZJMabEJ
 but 
not exactly.

Once I have it working, I will upload the java class to the web2py splices.

thanks!
Noam

-- 
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.

Reply via email to