0

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.

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.

I intend to use the same code to compile a mobile app using PhoneGap for example, hence I am not using ASP.Net.

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.

Carl
  • 1
  • 1
  • Look at http://msdn.microsoft.com/en-us/library/ee748498.aspx and a similar question on SO :http://stackoverflow.com/questions/7551/best-practices-for-securing-a-rest-api-web-service – Rajesh Feb 24 '12 at 10:01
  • @Rajesh - thank you for those suggestions, they are helpful. However my biggest problem/lack of understanding is how to implement those in the client. – Carl Feb 24 '12 at 10:18

0 Answers0