Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Monday, February 27, 2012
secure login Android / PHP
I use (sever side) a mysql db with php and (client side) Android. I would like to control data access. How I can make a SECURE login using Android and php?
Most applications these days use OAuth to handle this: Facebook, twitter, etc.. The idea is based on logging in, and then keeping a token to make requests to the API at the other end. While OAuth is not extremely simple, there are libraries out there for Android and PHP, and it's a trusted authentication strategy. You can Google for finding out how to implement OAuth in PHP, and there are libraries to handle OAuth on Android (really just Java, with APIs that are available on Android): http://oauth.net/code/
Im not 100% sure on this but maybe you could send the login data to the server (Like $_POST data), and return a token (Like $_SESSION data) to be used for the rest of the user transactions.
Most applications these days use OAuth to handle this: Facebook, twitter, etc.. The idea is based on logging in, and then keeping a token to make requests to the API at the other end. While OAuth is not extremely simple, there are libraries out there for Android and PHP, and it's a trusted authentication strategy. You can Google for finding out how to implement OAuth in PHP, and there are libraries to handle OAuth on Android (really just Java, with APIs that are available on Android): http://oauth.net/code/
ReplyDeleteIm not 100% sure on this but maybe you could send the login data to the server (Like $_POST data), and return a token (Like $_SESSION data) to be used for the rest of the user transactions.
ReplyDelete