title: Authentication in an HTML5 application talking to WCF REST Service
body: <p>I am a .Net developer looking to learn some HTML5 development. Traditionally all my web development has been done in ASP.Net or Silverlight and has always been business applications. I am now trying to put together an application using pure HTML5 - and by this I mean not using ASP.Net and instead having .html pages with javascript in. This app will be talking to a WCF service implementing REST.</p>
  
  <p>I want to start by authenticating a user in the application. Traditionally I would use ASP.Net's authentication provider or Windows basic. Neither of these are an option now. Everything will be hosted under SSL, but how do I implement an authentication model in the HTML/JS? I have looked at OAuth, but this seems more fitting for delegation. Something closer to forms authentications feels better.</p>
  
  <p>I intend to use the same code to compile a mobile app using PhoneGap for example, hence I am not using ASP.Net.</p>
  
  <p>I'd like some suggestions on how to implement security/authentication and some examples if possible. Ideally a token based approach so I can also consider ws-* on the server side.</p>