return createLdapContext(env);
return createLdapContext(env);
@Override protected LdapContext createLdapContext(Hashtable env) throws NamingException { String url = cfg.getUrl(); if (url != null && url.startsWith("ldaps:")) { env.put("java.naming.ldap.factory.socket", TrustingSslSocketFactory.class.getName()); } return super.createLdapContext(env); } };
/** * HACK */ @SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected LdapContext createLdapContext(Hashtable env) throws NamingException { if(getSystemUsername() != null && getSystemUsername().equals(env.get(Context.SECURITY_PRINCIPAL))) { env.put(Context.SECURITY_AUTHENTICATION, getSystemAuthenticationMechanism()); } return super.createLdapContext(env); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected LdapContext createLdapContext(Hashtable env) throws NamingException { if(getSystemUsername() != null && getSystemUsername().equals(env.get(Context.SECURITY_PRINCIPAL))) { env.put(Context.SECURITY_AUTHENTICATION, getSystemAuthenticationMechanism()); } return super.createLdapContext(env); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected LdapContext createLdapContext(Hashtable env) throws NamingException { if(getSystemUsername() != null && getSystemUsername().equals(env.get(Context.SECURITY_PRINCIPAL))) { env.put(Context.SECURITY_AUTHENTICATION, getSystemAuthenticationMechanism()); } return super.createLdapContext(env); }