-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to new version of LDAP library that works with Java 11.
Upgrade some dependencies and eliminate boot classpath compile warning.
- Loading branch information
analyst
committed
Apr 5, 2024
1 parent
dbe0152
commit 2c67145
Showing
4 changed files
with
365 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
import org.owasp.esapi.reference.DefaultEncoder; | ||
|
||
/** | ||
* A simple example exposing how to embed Apache Directory Server version 1.5.7 into an application. | ||
* A simple example exposing how to embed Apache Directory Server into an application. | ||
* | ||
* @author <a href="mailto:[email protected]">Apache Directory Project</a> | ||
* @version $Rev$, $Date$ | ||
|
@@ -48,13 +48,18 @@ public LDAPManager() { | |
try { | ||
ctx = getDirContext(); | ||
} catch (NamingException e) { | ||
// FIXME: Don't eat exceptions! | ||
System.out.println("Failed to get Directory Context: " + e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
protected Hashtable<Object, Object> createEnv() { | ||
Hashtable<Object, Object> env = new Hashtable<Object, Object>(); | ||
env.put(Context.PROVIDER_URL, "ldap://localhost:10389"); | ||
env.put(Context.SECURITY_AUTHENTICATION, "simple"); | ||
env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system"); | ||
env.put(Context.SECURITY_CREDENTIALS, "secret"); | ||
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); | ||
return env; | ||
} | ||
|
Oops, something went wrong.