November 2017
Intermediate to advanced
542 pages
14h 24m
English
Spring Security leverages Spring Expression Language (SpEL) integration in order to easily articulate various authorization requirements. If you recall, we have already looked at the use of SpEL in Chapter 2, Getting Started with Spring Security, when we defined our antMatcher() method:
.antMatchers("/events/").hasRole("ADMIN")
Spring Security provides an o.s.s.access.expression.SecurityExpressionRoot object that provides the methods and objects available for use, in order to make an access control decision. For example, one of the methods available to use is hasRole method, which accepts a string. This corresponds to the value of the access attribute (in the preceding code snippet). In fact, ...
Read now
Unlock full access