use of password.pwm.config.profile.LdapProfile in project pwm by pwm-project.
the class UserInfoReader method getUserEmailAddress2.
@Override
public String getUserEmailAddress2() throws PwmUnrecoverableException {
final LdapProfile ldapProfile = getUserIdentity().getLdapProfile(pwmApplication.getConfig());
final String ldapEmailAttribute = ldapProfile.readSettingAsString(PwmSetting.EMAIL_USER_MAIL_ATTRIBUTE_2);
return readStringAttribute(ldapEmailAttribute);
}
use of password.pwm.config.profile.LdapProfile in project pwm by pwm-project.
the class UserInfoReader method getUserSmsNumber3.
@Override
public String getUserSmsNumber3() throws PwmUnrecoverableException {
final LdapProfile ldapProfile = getUserIdentity().getLdapProfile(pwmApplication.getConfig());
final String ldapSmsAttribute = ldapProfile.readSettingAsString(PwmSetting.SMS_USER_PHONE_ATTRIBUTE_3);
return readStringAttribute(ldapSmsAttribute);
}
use of password.pwm.config.profile.LdapProfile in project pwm by pwm-project.
the class UserInfoReader method getUserEmailAddress.
@Override
public String getUserEmailAddress() throws PwmUnrecoverableException {
final LdapProfile ldapProfile = getUserIdentity().getLdapProfile(pwmApplication.getConfig());
final String ldapEmailAttribute = ldapProfile.readSettingAsString(PwmSetting.EMAIL_USER_MAIL_ATTRIBUTE);
return readStringAttribute(ldapEmailAttribute);
}
use of password.pwm.config.profile.LdapProfile in project pwm by pwm-project.
the class LdapConnectionService method getProxyChaiProvider.
public ChaiProvider getProxyChaiProvider(final LdapProfile ldapProfile) throws PwmUnrecoverableException {
final LdapProfile effectiveProfile = ldapProfile == null ? pwmApplication.getConfig().getDefaultLdapProfile() : ldapProfile;
if (threadLocalProvider.get() != null && threadLocalProvider.get().containsKey(effectiveProfile)) {
return threadLocalProvider.get().get(effectiveProfile);
}
final ChaiProvider chaiProvider = getNewProxyChaiProvider(effectiveProfile);
if (threadLocalProvider.get() == null) {
threadLocalProvider.set(new ConcurrentHashMap<>());
}
threadLocalProvider.get().put(effectiveProfile, chaiProvider);
return chaiProvider;
}
use of password.pwm.config.profile.LdapProfile in project pwm by pwm-project.
the class LdapConnectionService method init.
public void init(final PwmApplication pwmApplication) throws PwmException {
this.pwmApplication = pwmApplication;
chaiProviderFactory = ChaiProviderFactory.newProviderFactory();
// read the lastLoginTime
this.lastLdapErrors.putAll(readLastLdapFailure(pwmApplication));
final int connectionsPerProfile = maxSlotsPerProfile(pwmApplication);
LOGGER.trace("allocating " + connectionsPerProfile + " ldap proxy connections per profile");
slotIncrementer = new AtomicLoopIntIncrementer(connectionsPerProfile);
for (final LdapProfile ldapProfile : pwmApplication.getConfig().getLdapProfiles().values()) {
proxyChaiProviders.put(ldapProfile, new ConcurrentHashMap<>());
}
status = STATUS.OPEN;
}
Aggregations