Package org.forgerock.opendj.examples
Class SimpleAuthAsync
- java.lang.Object
-
- org.forgerock.opendj.examples.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
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/keystoreand the trust store password if necessary by using the JSSE system property-Djavax.net.ssl.trustStorePassword=`cat /path/to/opendj/config/keystore.pin`.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Authenticate to the directory either over LDAP, over LDAPS, or using StartTLS.
-
-
-
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
-
-