HTTP Basic Authentication with ASP.NET MVC
PM> Install-Package MvcBasicAuth
- Make sure your project uses ASP.NET MVC Dependency Injection.
- Create authentication service by implementing MvcBasicAuth.IHttpBasicAuthentication interface.
- Register authentication service in the IoC container.
- Use MvcBasicAuth.HttpBasicAuthenticationAttribute attribute to annotate actions that require HTTP Basic Authentication.
Please take a look to sample application source code to see HTTP Basic Authentication in action.