At the outset, I apologize if my English is not up to par; I will do my best to be as clear as possible. I am in the process of planning a web site with the following architecture:
The site will consist of static pages served to clients using JavaScript templates and ajax to load content, with the content being provided via an ASP.NET MVC application that sends JSON results to the client pages.
My question is quite straightforward: What methods can I employ to create private areas for users on my site?
The only solution that comes to mind is to implement a login page that sends encrypted login information to the server via ajax. The server would then return a token to be stored as a cookie. For subsequent calls to the server via ajax (specifically to access private areas), the token would need to be sent and authenticated, with the appropriate content provided as a result.
How can I go about implementing this system? What security and privacy issues should I be aware of?
For reference, I am utilizing C# on the server side, along with JQuery for basic ajax handling and Jquery.LoadJSON for content loading. I am also using Mustache in JavaScript to manage elements such as partials. I am seeking a solution that allows for easy and clear cookie management; any suggestions are welcome.
Thank you in advance!