use of org.xdi.service.ldap.LdapConnectionService in project oxAuth by GluuFederation.
the class AppInitializer method createBindConnectionProvider.
private LdapConnectionService createBindConnectionProvider(Properties bindConnectionProperties, Properties connectionProperties) {
LdapConnectionService bindConnectionProvider = createConnectionProvider(bindConnectionProperties);
if (ResultCode.INAPPROPRIATE_AUTHENTICATION.equals(bindConnectionProvider.getCreationResultCode())) {
log.warn("It's not possible to create authentication LDAP connection pool using anonymous bind. Attempting to create it using binDN/bindPassword");
bindConnectionProvider = createConnectionProvider(connectionProperties);
}
return bindConnectionProvider;
}
use of org.xdi.service.ldap.LdapConnectionService in project oxTrust by GluuFederation.
the class AppInitializer method createConnectionProvider.
private LdapConnectionService createConnectionProvider(Properties connectionProperties) {
EncryptionService securityService = encryptionServiceInstance.get();
LdapConnectionService connectionProvider = new LdapConnectionService(securityService.decryptProperties(connectionProperties));
return connectionProvider;
}
use of org.xdi.service.ldap.LdapConnectionService in project oxAuth by GluuFederation.
the class AppInitializer method createConnectionProvider.
private LdapConnectionService createConnectionProvider(Properties connectionProperties) {
EncryptionService securityService = encryptionServiceInstance.get();
LdapConnectionService connectionProvider = new LdapConnectionService(securityService.decryptProperties(connectionProperties));
return connectionProvider;
}
use of org.xdi.service.ldap.LdapConnectionService in project oxAuth by GluuFederation.
the class AppInitializer method createAuthConnectionProviders.
private void createAuthConnectionProviders(List<GluuLdapConfiguration> newLdapAuthConfigs) {
// Backup current references to objects to allow shutdown properly
List<GluuLdapConfiguration> oldLdapAuthConfigs = ldapAuthConfigInstance.get();
List<LdapConnectionService> tmpAuthConnectionProviders = new ArrayList<LdapConnectionService>();
List<LdapConnectionService> tmpAuthBindConnectionProviders = new ArrayList<LdapConnectionService>();
// Prepare connection providers per LDAP authentication configuration
for (GluuLdapConfiguration ldapAuthConfig : newLdapAuthConfigs) {
LdapConnectionProviders ldapConnectionProviders = createAuthConnectionProviders(ldapAuthConfig);
tmpAuthConnectionProviders.add(ldapConnectionProviders.getConnectionProvider());
tmpAuthBindConnectionProviders.add(ldapConnectionProviders.getConnectionBindProvider());
}
this.ldapAuthConfigs = newLdapAuthConfigs;
this.authConnectionProviders = tmpAuthConnectionProviders;
this.authBindConnectionProviders = tmpAuthBindConnectionProviders;
ldapAuthConfigInstance.destroy(oldLdapAuthConfigs);
}
use of org.xdi.service.ldap.LdapConnectionService in project oxAuth by GluuFederation.
the class AppInitializer method createAuthConnectionProviders.
public LdapConnectionProviders createAuthConnectionProviders(GluuLdapConfiguration ldapAuthConfig) {
Properties connectionProperties = prepareAuthConnectionProperties(ldapAuthConfig);
LdapConnectionService connectionProvider = createConnectionProvider(connectionProperties);
Properties bindConnectionProperties = prepareBindConnectionProperties(connectionProperties);
LdapConnectionService bindConnectionProvider = createBindConnectionProvider(bindConnectionProperties, connectionProperties);
return new LdapConnectionProviders(connectionProvider, bindConnectionProvider);
}
Aggregations