I wish to accomplish two simple things with a basic Angularjs application that has both a public and secure area (home page and admin page respectively) that both use a few web api calls.
- Login using email address and password
- check if user is logged in (has a session) before he can access the admin section (using $routeProvider resolve)
I've searched for hours for something simple but everything that I come across seems still too complex (e.g. http://www.codeproject.com/Articles/784106/AngularJS-Token-Authentication-using-ASP-NET-Web-A).
Are there any examples on how to handle these two steps with basic .Net code? I have a small entity class (that inherits DBContext).
I call this in my web API controller and there manipulate my data before I send it back to the angularjs front. There is no need for roles. There is only one login which is added manually in the database, the password is securely stored but the site won't be using https. The data that is to be shown is simply for upcoming venues for a couple hundred guests. After the venue the data is deleted.
I have trouble with this since it's been quite a while since I used web api in this fashion (for authentication and validation).