Skip to content

Instantly share code, notes, and snippets.

@sintetico82
sintetico82 / gist:ee5f4b735fcec6db2271bba55c4529d8
Created July 25, 2017 16:23
GrantedAuthoritiesMapper problem
@Bean
public AuthenticationProvider activeDirectoryLdapAuthenticationProvider() {
ActiveDirectoryLdapAuthenticationProvider provider = new ActiveDirectoryLdapAuthenticationProvider(domain, adUrls);
provider.setConvertSubErrorCodesToExceptions(true);
provider.setUseAuthenticationRequestCredentials(true);
provider.setAuthoritiesMapper(applicationADGrantedAuthoritiesMapper());
return provider;
}