Course Content

Course Content


An authentication filter is a piece of software that verifies the authenticity of an HTTP request. Both Web API 2 and MVC 5 allow authentication filters, although the naming conventions for the filter interface differ slightly. Authentication filters for Web APIs are discussed in this topic.

  • Create a new project in Visual Studio 2015 or another editor of your choice.
  • Select the "web application" project and give it a name that fits your needs.
  • Click OK after selecting the "empty" template and checking the MVC box.

  • Select "web application" as your project type and give it a suitable name.
  • Click OK after selecting "empty" template and checking the MVC option.
  • Add a new controller by right-clicking on the controllers folder.
  • In HomeController, right-click on the Index method.

In general, there are three phases to creating a filter: - Create a Java class that implements the Filter interface and extends the life cycle methods of the filter. - Set the filter's starting parameters (optional). - Choose whether to bind filters to Java servlets or URL patterns.

The server and client sides of interceptors use the same API. Interceptors are used to manipulate entities via modifying entity input/output streams, whereas filters are used to manipulate request and response parameters such as HTTP headers, URIs, and/or HTTP methods.

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere