November 2017
Intermediate to advanced
542 pages
14h 24m
English
The Spring Security tag library provides functionality to render content based on the existing URL authorization rules that are already defined in the security configuration file. This is done via the use of the authorizeRequests() method and the antMatchers() method.
If there are multiple HTTP elements, the authorizeRequests() method uses the currently matched HTTP element's rules.
For example, we could ensure that the All Events link is displayed only when appropriate, that is, for users who are administrators—recall that the access rules we've previously defined are as follows:
.antMatchers("/events/").hasRole("ADMIN")
Update the header.html file to utilize this information and conditionally ...
Read now
Unlock full access