November 2015
Intermediate to advanced
152 pages
2h 46m
English
The http://aspnet.codeplex.com provides the sample code for the authentication filter named IdentityBasicAuthenticationAttribute that implements HTTP Basic Access Authentication scheme (RFC 2617). We can make use of this [IdentityBasicAuthentication] authentication filter and apply it at the action level, controller level, or global level that can be applied to all the controllers and actions.
To apply a basic authentication filter at action level, we need to decorate the respective actions with the [IdentityBasicAuthentication] filter as given in the following:
// Require authenticated requests. public class ContactsController : ApiController { public HttpResponseMessage GetContact() ...Read now
Unlock full access