org.springframework.security.ldap.authentication.LdapAuthenticator Java Examples

The following examples show how to use org.springframework.security.ldap.authentication.LdapAuthenticator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomLdapAuthenticationProvider.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public CustomLdapAuthenticationProvider( LdapAuthenticator authenticator, LdapAuthoritiesPopulator authoritiesPopulator, DhisConfigurationProvider configurationProvider )
{
    super( authenticator, authoritiesPopulator );

    checkNotNull( configurationProvider );
    this.configurationProvider = configurationProvider;
}
 
Example #2
Source File: LdapProvider.java    From Kylin with Apache License 2.0 5 votes vote down vote up
/**
 * @param authenticator
 * @param authoritiesPopulator
 */
public LdapProvider(LdapAuthenticator authenticator, LdapAuthoritiesPopulator authoritiesPopulator) {
    super(authenticator, authoritiesPopulator);

    try {
        md = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException e) {
        throw new RuntimeException("Failed to init Message Digest ", e);
    }
}
 
Example #3
Source File: OsiamLdapAuthenticationProvider.java    From osiam with MIT License 5 votes vote down vote up
public OsiamLdapAuthenticationProvider(LdapAuthenticator authenticator,
                                       LdapAuthoritiesPopulator authoritiesPopulator,
                                       OsiamLdapUserContextMapper osiamLdapUserContextMapper,
                                       SCIMUserProvisioning userProvisioning,
                                       boolean syncUserData) {
    super(authenticator, authoritiesPopulator);
    this.osiamLdapUserContextMapper = osiamLdapUserContextMapper;
    this.userProvisioning = userProvisioning;
    this.syncUserData = syncUserData;
}
 
Example #4
Source File: ApolloLdapAuthenticationProvider.java    From apollo with Apache License 2.0 5 votes vote down vote up
public ApolloLdapAuthenticationProvider(
    LdapAuthenticator authenticator,
    LdapAuthoritiesPopulator authoritiesPopulator,
    LdapExtendProperties properties) {
  super(authenticator, authoritiesPopulator);
  this.properties = properties;
}
 
Example #5
Source File: LdapManager.java    From blackduck-alert with Apache License 2.0 5 votes vote down vote up
private LdapAuthenticator createAuthenticator(FieldAccessor configurationModel, LdapContextSource contextSource) throws AlertConfigurationException {
    BindAuthenticator authenticator = new BindAuthenticator(contextSource);
    try {
        String[] userDnArray = createArrayFromCSV(configurationModel.getStringOrEmpty(AuthenticationDescriptor.KEY_LDAP_USER_DN_PATTERNS));
        String[] userAttributeArray = createArrayFromCSV(configurationModel.getStringOrEmpty(AuthenticationDescriptor.KEY_LDAP_USER_ATTRIBUTES));
        authenticator.setUserSearch(createLdapUserSearch(configurationModel, contextSource));
        authenticator.setUserDnPatterns(userDnArray);
        authenticator.setUserAttributes(userAttributeArray);
        authenticator.afterPropertiesSet();
    } catch (Exception ex) {
        throw new AlertConfigurationException("Error creating LDAP authenticator", ex);
    }
    return authenticator;
}
 
Example #6
Source File: ApolloLdapAuthenticationProvider.java    From apollo with Apache License 2.0 4 votes vote down vote up
public ApolloLdapAuthenticationProvider(
    LdapAuthenticator authenticator) {
  super(authenticator);
}
 
Example #7
Source File: ApolloLdapAuthenticationProvider.java    From apollo with Apache License 2.0 4 votes vote down vote up
public ApolloLdapAuthenticationProvider(
    LdapAuthenticator authenticator,
    LdapAuthoritiesPopulator authoritiesPopulator) {
  super(authenticator, authoritiesPopulator);
}
 
Example #8
Source File: ApolloLdapAuthenticationProvider.java    From apollo with Apache License 2.0 4 votes vote down vote up
public ApolloLdapAuthenticationProvider(
    LdapAuthenticator authenticator,
    LdapExtendProperties properties) {
  super(authenticator);
  this.properties = properties;
}
 
Example #9
Source File: WebTestConfiguration.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Bean
public LdapAuthenticator ldapAuthenticator() {
    return authentication -> null;
}
 
Example #10
Source File: LogsearchLdapAuthenticationProvider.java    From ambari-logsearch with Apache License 2.0 4 votes vote down vote up
public LogsearchLdapAuthenticationProvider(LdapAuthenticator bindAuthenticator, LdapAuthoritiesPopulator ldapAuthoritiesPopulator) {
  super(bindAuthenticator, ldapAuthoritiesPopulator);
}
 
Example #11
Source File: LdapAuthenticationProviderProxy.java    From gravitee-management-rest-api with Apache License 2.0 4 votes vote down vote up
public LdapAuthenticationProviderProxy(LdapAuthenticator authenticator) {
    super(authenticator);
}
 
Example #12
Source File: LdapAuthenticationProviderProxy.java    From gravitee-management-rest-api with Apache License 2.0 4 votes vote down vote up
public LdapAuthenticationProviderProxy(LdapAuthenticator authenticator, LdapAuthoritiesPopulator authoritiesPopulator) {
    super(authenticator, authoritiesPopulator);
}
 
Example #13
Source File: SpringLdapAuthenticationProvider.java    From unitime with Apache License 2.0 4 votes vote down vote up
public SpringLdapAuthenticationProvider(LdapAuthenticator authenticator) {
	super(authenticator);
}
 
Example #14
Source File: SpringLdapAuthenticationProvider.java    From unitime with Apache License 2.0 4 votes vote down vote up
public SpringLdapAuthenticationProvider(LdapAuthenticator authenticator, LdapAuthoritiesPopulator authoritiesPopulator) {
	super(authenticator, authoritiesPopulator);
}
 
Example #15
Source File: RangerAuthenticationProvider.java    From ranger with Apache License 2.0 4 votes vote down vote up
public LdapAuthenticator getAuthenticator() {
	return authenticator;
}
 
Example #16
Source File: RangerAuthenticationProvider.java    From ranger with Apache License 2.0 4 votes vote down vote up
public void setAuthenticator(LdapAuthenticator authenticator) {
	this.authenticator = authenticator;
}
 
Example #17
Source File: LdapManager.java    From blackduck-alert with Apache License 2.0 4 votes vote down vote up
private LdapAuthenticationProvider updateAuthenticationProvider(FieldAccessor configurationModel, LdapContextSource contextSource) throws AlertConfigurationException {
    LdapAuthenticator authenticator = createAuthenticator(configurationModel, contextSource);
    LdapAuthoritiesPopulator ldapAuthoritiesPopulator = createAuthoritiesPopulator(configurationModel, contextSource);
    return new LdapAuthenticationProvider(authenticator, ldapAuthoritiesPopulator);
}