public class LDAPProxiedAuthControl extends LDAPControl
You can include the control in any request by constructing
an LDAPSearchConstraints
object and calling the
setServerControls
method. You can then pass this
LDAPSearchConstraints
object to the search
or other request method of an LDAPConnection
object.
For example:
... LDAPConnection ld = new LDAPConnection(); try { // Connect to server. ld.connect( 3, hostname, portnumber, "", "" ); // Create a "critical" proxied auth server control using // the DN "uid=charlie,ou=people,o=acme.com". LDAPProxiedAuthControl ctrl = new LDAPProxiedAuthControl( "uid=charlie,ou=people,o=acme.com", true ); // Create search constraints to use that control. LDAPSearchConstraints cons = new LDAPSearchConstraints(); cons.setServerControls( sortCtrl ); // Send the search request. LDAPSearchResults res = ld.search( "o=Airius.com", LDAPv3.SCOPE_SUB, "(cn=Barbara*)", null, false, cons ); ...
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROXIEDAUTHREQUEST |
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
Constructor and Description |
---|
LDAPProxiedAuthControl(java.lang.String dn,
boolean critical)
Constructs an
LDAPProxiedAuthControl object with a
DN to use as identity. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Return a string representation of the control for debugging
|
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
public static final java.lang.String PROXIEDAUTHREQUEST
public LDAPProxiedAuthControl(java.lang.String dn, boolean critical)
LDAPProxiedAuthControl
object with a
DN to use as identity.dn
- DN to use as identity for execution of a requestcritical
- true
if the LDAP operation should be
discarded when the server does not support this control (in other
words, this control is critical to the LDAP operation)LDAPControl
public java.lang.String toString()
LDAPControl
toString
in class LDAPControl