com.sun.jndi.ldap.ctl
Class AuthorizationIDControl

java.lang.Object
  extended by com.sun.jndi.ldap.BasicControl
      extended by com.sun.jndi.ldap.ctl.AuthorizationIDControl
All Implemented Interfaces:
java.io.Serializable, javax.naming.ldap.Control

public class AuthorizationIDControl
extends com.sun.jndi.ldap.BasicControl

This class implements the LDAP request control for authorization identity control. This control is used to request that the server return the authorization identity (in the LDAP bind response) resulting from the accompanying LDAP bind operation. It is a connection request control as described in InitialLdapContext

The Authorization Identity Bind Control is defined in draft-weltman-ldapv3-auth-response-08.

The object identifier used for Authorization Identity control is 2.16.840.1.113730.3.4.16 and the control has no value.

The following code sample shows how the control may be used:


     // create an authorization identity bind control
     Control[] reqControls = new Control[]{
         new AuthorizationIDControl()
     };

     // create an initial context using the supplied environment properties
     // and the supplied control
     LdapContext ctx = new InitialLdapContext(env, reqControls);
     Control[] respControls;

     // retrieve response controls
     if ((respControls = ctx.getResponseControls()) != null) {
         for (int i = 0; i < respControls.length; i++) {

             // locate the authorization identity response control
             if (respControls[i] instanceof AuthorizationIDResponseControl) {
                 System.out.println("My identity is " +
                     ((AuthorizationIDResponseControl) respControls[i])
                         .getAuthorizationID());
             }
         }
     }

 

Author:
Vincent Ryan
See Also:
AuthorizationIDResponseControl, WhoAmIRequest, Serialized Form

Field Summary
static java.lang.String OID
          The authorization identity control's assigned object identifier is 2.16.840.1.113730.3.4.16.
private static long serialVersionUID
           
 
Fields inherited from class com.sun.jndi.ldap.BasicControl
criticality, id, value
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Constructor Summary
AuthorizationIDControl(boolean criticality)
          Constructs a control to request the authorization identity.
 
Method Summary
 
Methods inherited from class com.sun.jndi.ldap.BasicControl
getEncodedValue, getID, isCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final java.lang.String OID
The authorization identity control's assigned object identifier is 2.16.840.1.113730.3.4.16.

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

AuthorizationIDControl

public AuthorizationIDControl(boolean criticality)
Constructs a control to request the authorization identity.

Parameters:
criticality - The control's criticality setting.