Java 类org.springframework.security.core.authority.mapping.NullAuthoritiesMapper 实例源码

项目:service-authorization    文件:ActiveDirectoryAuthProvider.java   
@Override
protected AuthenticationProvider getDelegate() {

    ActiveDirectoryConfig adConfig = authConfigRepository.findActiveDirectory(true)
            .orElseThrow(() -> new BadCredentialsException("Active Directory is not configured"));

    ActiveDirectoryLdapAuthenticationProvider adAuth = new ActiveDirectoryLdapAuthenticationProvider(adConfig.getDomain(),
            adConfig.getUrl(), adConfig.getBaseDn());

    adAuth.setAuthoritiesMapper(new NullAuthoritiesMapper());
    adAuth.setUserDetailsContextMapper(new DetailsContextMapper(ldapUserReplicator, adConfig.getSynchronizationAttributes()));
    return adAuth;
}