android call. net webservice, login when sending the username and password in the webservice verify the validity of the results back to android, this has been achieved, but the next call webservice in other ways how to determine whether it already registered? Is not every method must carry the user name and password every time validation? android beginner, please advise!
------ Solution ---------------------------------------- ----
theoretically when the need to call a method to detect the user name and password. This is the most stringent. But you can be controlled according to the client, if the client passed the login authentication, then the default he has landed, the program exposed to his service-side interface is the default landing him, if he launched landing, in the client, you should not these services end interfaces exposed. However, the recommended time for each visit you check, front and back simultaneously check is a lot of sophisticated software essential elements.
------ Solution ---------------------------------------- ----
I've done before project approach:
1 Log in to the service when the client sends the user name and password, the server will return to give us a user ID, the user ID is a server-side generated by some rules (based on user Bind) .
2 next time to visit other methods need to bring this user Id, server monitoring based on the user ID of the user is logged in.
this is not required to carry a user name and password each time the unsafe and trouble
------ For reference only ---------------------------------- -----
android version of the popular No Well
------ For reference only ------------------------- --------------
We now use the webservice test is open, as long as access to the url that can be accessed, this is clearly not, then how to verify it, or say how to save the state of the user logged it?
------ For reference only -------------------------------------- -
search to for a long time but could not find a better solution ~!
------ For reference only -------------------------------------- -
currently used is returned to the login android client after a similar token of the encrypted string that is passed to the user name and password encryption, each call to the webservice other functions should carry this token, each time for validation, and this token password and user name just a relationship, so they do not modify these two parameters are the same every time, do not know if there was a better solution?
------ For reference only -------------------------------------- -
This is the meaning of my reply. A better solution is not clear, but it is currently the most commonly used
没有评论:
发表评论