title: Writing a secure REST web service
body: <p>Many of them are getting confused on how to write a secure rest webservice, for those who are confused to which method to use this post will be helpful in a great way.</p>
  
  <p><strong>Possible ways of writing REST services(Partially Secure)</strong></p>
  
  <ul>
  <li><p>You realize that literally passing the credentials over HTTP leaves that data open to being sniffed in plain-text; After the Gawker incident, you realize that plain-text or weakly-hashed anything is usually a bad idea.</p></li>
  <li><p>You realize that hashing the password and sending the hash over the wire in lieu of the plain-text password still gives people sniffing at least the username for the account and a hash of the password that could (in a disturbing number of cases) be looked up in a Rainbow Table.</p></li>
  <li><p>you exclaim, because in this case (which is really a username/password scenario all over again) you still suffer from the same problems (sniffed traffic) that sending the username and password in plain text had.</p></li>
  <li><p>At this point you are about to give up and concede to using <strong>OAuth</strong>, but you insist that there has to be a secure but relatively easy way to design a public web API that can keep credentials private.</p></li>
  </ul>