This sytem demonstrates a basic three-teir architecture for an authentication system. The tiers are laid out as follows:
- HealthStream.Sql
- Contains the database structure
- HealthStream.Data
- Data access assembly
- HealthStream.Services
- Contains the application service libraries
- HealthStream.Api
- OWIN WebAPI web services for accessing the services remotely
- HealthStream.Web
- Single page AngularJS app utilizing the WebAPI provided above.
Live demo can be found here.
- Deploy the HealthStream.Sql project to the database of your choice. I'm using localdb for development. Be sure to update the Web.config file in the HealthStream.Api project with connection string of your database.
- Install npm, grunt, and bower
- In the HealthStream.Web project, run npm install and grunt
- Set HealthStream.Api and HealthStream.Web as startup projects
- Press F5 and visit the URL for the HealthStream.Web project.
- Basic authentication system
- Implement registration
- Implement basic user authentication
- Implement account lockout on 5 incorrect login attempts.
- User must reset password to re-enable account. - Implement password reset functionality
- Token Authentication
- Regenerate random token on login and lock to the IP address given
- Implement OWIN middleware to validate token on each needed request
- Implement AngularJS interceptor to add token to each ajax call