B4J Library LDAP server

"unboundid-ldap-sdk-for-java" contains an overwhelming amount of stuff to interact with Ldap-servers.
As such, a Ldap-server can be used to store almost anything in a structured way.


the library UNBOUNDID4B4J wraps https://www.ldap.com/unboundid-ldap-sdk-for-java.
UNBOUNDID4B4J is written to interact with Ldap-PGP-keyservers.
Note that it should also be possible to use this library with Android.
The source code of UNBOUNDID4B4J is included, feel free to change and adapt it to your needs...

the library IMLDAPSERVER4B4J wraps https://www.ldap.com/unboundid-ldap-sdk-for-java and is used to construct an "in-memory" LDAP-server.
Such a server might be a good alternative to a standard Ldap-server (ApacheDS, OpenLdap, ...).

Again, the source code of IMLDAPSERVER4B4J is included, feel free to change and adapt it to your needs...

SimpleLibraryCompiler is used to compile UNBOUNDID4B4J and IMLDAPSERVER4B4J
unboundid-ldapsdk.jar can be downloaded from https://www.ldap.com/unboundid-ldap-sdk-for-java
 

Attachments

  • Wrapperunboundid.zip
    51.2 KB · Views: 282
  • Wrapperunboundid.zip
    51.2 KB · Views: 227

alienhunter

Active Member
Licensed User
Longtime User
Hi
how would i check a user if the username and password is ok

something like that

B4X:
String authzID = null;
BindRequest bindRequest =
     new SimpleBindRequest("uid=test.user,ou=People,dc=example,dc=com",
          "password", new AuthorizationIdentityRequestControl());

BindResult bindResult = connection.bind(bindRequest);
AuthorizationIdentityResponseControl authzIdentityResponse =
     AuthorizationIdentityResponseControl.get(bindResult);
if (authzIdentityResponse != null)
{
  authzID = authzIdentityResponse.getAuthorizationID();
}


thank you
 
Top