November 2017
Intermediate to advanced
542 pages
14h 24m
English
Spring Security added AD support in Spring Security 3.1. In fact, the ActiveDirectoryLdapAuthoritiesPopulator class from the previous section is based on the newly-added support. To utilize the built-in support in Spring Security 4.2, we can replace our entire SecurityConfig.java file with the following configuration:
//src/main/java/com/packtpub/springsecurity/configuration/SecurityConfig.java @Bean public AuthenticationProvider authenticationProvider(){ ActiveDirectoryLdapAuthenticationProvider ap = new ActiveDirectoryLdapAuthenticationProvider("corp.jbcpcalendar.com", "ldap://corp.jbcpcalendar.com/"); ap.setConvertSubErrorCodesToExceptions(true); return ap; }
Of course, if you are going to use ...
Read now
Unlock full access