My iphone application wants to connect to server by giving username and password. How can I send this password securely. Anyone please help. I am a beginner.
- 5You tagged your question 'ssl' .. what's wrong with using ssl?Anonymoose– Anonymoose2010-05-12 06:29:57 +00:00Commented May 12, 2010 at 6:29
- Can you please tell, how to use it. Any sample codes or tutorials ?isarathg– isarathg2010-05-12 06:48:26 +00:00Commented May 12, 2010 at 6:48
- simply send your request to an "https" instead of "http" URL, and it will automatically be encrypted.Michael Aaron Safyan– Michael Aaron Safyan2010-05-12 06:49:48 +00:00Commented May 12, 2010 at 6:49
2 Answers
If you are unable to use SSL for some reason but you have control over the server side, you may try a "Challenge-response authentication" 1.
Comments
This depends on the reasons you are submitting a username and password. If you are submitting the username and password to your own service, then simply use Transport Layer Security (TLS), as it will generate an encrypted session and all data sent during the session will be encrypted. If you are trying to login to an online web service, you will probably need to follow whatever authentication protocol that particular web service uses. Many websites use OAuth, for example. If you are connecting to such a service, you should also see if there are any client libraries available for communicating with that service as many popular web services already have code available to communicate and authenticate with them.