Package org.forgerock.opendj.examples
Class SASLAuth
java.lang.Object
org.forgerock.opendj.examples.SASLAuth
An example client application which performs SASL PLAIN authentication to a
directory server over LDAP with StartTLS. This example takes the following
command line parameters:
- host - host name of the directory server
- port - port number of the directory server for StartTLS
- authzid - (Optional) Authorization identity
- authcid - Authentication identity
- passwd - Password of the user to authenticate
The authzid and authcid are prefixed as described in RFC 4513, section 5.2.1.8, with "dn:" if you pass in a distinguished name, or with "u:" if you pass in a user ID.
By default, OpenDJ is set up for SASL PLAIN to use the Exact Match Identity Mapper to find entries by searching uid values for the user ID. In other words, the following examples are equivalent.
dn:uid=bjensen,ou=people,dc=example,dc=com u:bjensen
-
Method Summary
-
Method Details
-
main
Authenticate to the directory using SASL PLAIN.- Parameters:
args- The command line arguments
-