B4J Library LDAP server

Discussion in 'B4J Libraries & Classes' started by fransvlaarhoven, Mar 6, 2018.

  1. fransvlaarhoven

    fransvlaarhoven Active Member Licensed User

    "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
     

    Attached Files:

    DonManfred, inakigarm and Erel like this.
  2. alienhunter

    alienhunter Active Member Licensed User

    Hi
    how would i check a user if the username and password is ok

    something like that

    Code:
    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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice