Skip to Content
Spring Security in Action
book

Spring Security in Action

by Laurentiu Spilca
October 2020
Beginner to intermediate
560 pages
14h 52m
English
Manning Publications
Content preview from Spring Security in Action

17 Global method security: Pre- and postfiltering

This chapter covers

  • Using prefiltering to restrict what a method receives as parameter values

  • Using postfiltering to restrict what a method returns

  • Integrating filtering with Spring Data

In chapter 16, you learned how to apply authorization rules using global method security. We worked on examples using the @PreAuthorize and @PostAuthorize annotations. By using these annotations, you apply an approach in which the application either allows the method call or it completely rejects the call. Suppose you don’t want to forbid the call to a method, but you want to make sure that the parameters sent to it follow some rules. Or, in another scenario, you want to make sure that after someone ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Security in Action, Second Edition

Spring Security in Action, Second Edition

Laurentiu Spilca

Publisher Resources

ISBN: 9781617297731Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link