February 2019
Intermediate to advanced
442 pages
11h 46m
English
In the Example DIT structures section of this chapter, we created a role entity (ou=roles) under the root entity (o=packtPublisher). The role entity contains various roles as its child entities. We will look at how to use these roles to perform authorization with Spring Security. We have already configured Spring Security to perform authentication with LDAP. We will now add two sample pages, and configure it so that one page is only accessible by a user with the ADMIN role, and the other is accessible by a user with either the USER or ADMIN role.
To achieve this, the changes need to be done in the configure method of the WebSecurityConfig class that we created for Spring Security configuration. ...