title: Basic Authentication with a Guid token for REST api instead of username/password
body: <h2>Overview</h2>
  
  <p>I am developing a mobile application using PhoneGap with REST API for the backend. The REST API won't be utilised by third-party developers, but will be application-specific, so there is no need for oAuth to be implemented. Hence, I am planning to use Basic Authentication where in the User enters their Username/password to access the API resources. All API communication will be on SSL.</p>
  
  <h2>Basic Authentication with Token</h2>
  
  <p>Instead of letting the application store the username/password and send it with every request to the API, I would rather authenticate username/password on the first login request and send a GUID token back. The client stores this GUID token and sends the token back to the API with each request through the Authorization header, like this:</p>
  
  <blockquote>
    <p>Authorization: Basic e1d9753f-a508-46cc-a428-1787595d63e4</p>
  </blockquote>
  
  <p>On the server side, the username/GUID combination will be stored on the server with a expiration date along with device settings. This will allow to keep track of the number of devices a user has logged in from as well as expire the session once the Guid has reached expiration.</p>
  
  <p>Does this approach sound reasonable and secure?</p>