Authentication filters let you set an authentication scheme for individual controllers or actions. In this way, your app can support various authentication mechanisms for different HTTP resources. Like other filters, authentication filters can be applied per-controller, per-action, or globally to all Web API controllers.
To apply the authentication filter to a controller, decorate the controller class with the filter attribute. The code sets theÂ
IdentityBasicAuthentication] filter on a controller class, which enables Basic Authentication for all of the controller’s actions.
In this article, the sample shows an authentication filter that implements the HTTP Basic Access Authentication scheme.
Read the rest of the tutorial here:Â http://www.asp.net/web-api/overview/security/authentication-filters