5 A web app’s security begins with filters

This chapter covers

  • Working with the filter chain
  • Defining custom filters
  • Using Spring Security classes that implement the Filter interface

In Spring Security, HTTP filters delegate different responsibilities to an HTTP request. Furthermore, they generally manage each responsibility that must be applied to the request. The filters thus form a chain of responsibilities. A filter receives a request, executes its logic, and eventually delegates the request to the next filter in the chain (figure 5.1).

Figure 5.1 The request is passed to the filter chain. Every filter engages a manager to execute particular ...

Get Spring Security in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.