Class SimpleAuthAsync


  • public final class SimpleAuthAsync
    extends Object
    An example client application which performs simple authentication to a directory server using the asynchronous APIs.
    This example takes the following command line parameters:
    • host - host name of the directory server
    • port - port number of the directory server
    • bind-dn - DN of the user to authenticate
    • bind-password - Password of the user to authenticate
    • use-starttls - (Optional) connect with StartTLS
    • use-ssl - (Optional) connect over SSL
    The host, port, bind-dn, and bind-password arguments are required. The use-starttls and use-ssl arguments are optional and mutually exclusive.
    If the server certificate is self-signed, or otherwise not trusted out-of-the-box, then set the trust store by using the JSSE system property -Djavax.net.ssl.trustStore=/path/to/opendj/config/keystore and the trust store password if necessary by using the JSSE system property -Djavax.net.ssl.trustStorePassword=`cat /path/to/opendj/config/keystore.pin`.
    • Method Detail

      • main

        public static void main​(String[] args)
        Authenticate to the directory either over LDAP, over LDAPS, or using StartTLS.
        Parameters:
        args - The command line arguments