fix #1052 add SECURITY_PROTOCOL

This commit is contained in:
Shinsuke Sugaya 2017-05-11 15:39:41 +09:00
parent 2c46ee7fc3
commit 9fe3c068af

View file

@ -71,6 +71,9 @@ public class LdapManager {
env.put(Context.PROVIDER_URL, providerUrl);
env.put(Context.SECURITY_PRINCIPAL, principal);
env.put(Context.SECURITY_CREDENTIALS, credntials);
if (providerUrl != null && providerUrl.startsWith("ldaps://")) {
env.put(Context.SECURITY_PROTOCOL, "ssl");
}
return env;
}