org.opends.server.controls
Class ProxiedAuthV1Control

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.ProxiedAuthV1Control

public class ProxiedAuthV1Control
extends Control

This class implements version 1 of the proxied authorization control as defined in early versions of draft-weltman-ldapv3-proxy (this implementation is based on the "-04" revision). It makes it possible for one user to request that an operation be performed under the authorization of another. The target user is specified as a DN in the control value, which distinguishes it from later versions of the control (which used a different OID) in which the target user was specified using an authorization ID.


Constructor Summary
ProxiedAuthV1Control(ASN1OctetString rawAuthorizationDN)
          Creates a new instance of the proxied authorization v1 control with the provided information.
ProxiedAuthV1Control(DN authorizationDN)
          Creates a new instance of the proxied authorization v1 control with the provided information.
 
Method Summary
static ProxiedAuthV1Control decodeControl(Control control)
          Creates a new proxied authorization v1 control from the contents of the provided control.
 DN getAuthorizationDN()
          Retrieves the authorization DN from the control value.
 Entry getAuthorizationEntry()
          Retrieves the authorization entry for this proxied authorization V1 control.
 ASN1OctetString getRawAuthorizationDN()
          Retrieves the raw, unprocessed authorization DN from the control value.
 void setAuthorizationDN(DN authorizationDN)
          Specifies the authorization DN for this proxied auth control.
 void setRawAuthorizationDN(ASN1OctetString rawAuthorizationDN)
          Specifies the raw, unprocessed authorization DN for this proxied auth control.
 java.lang.String toString()
          Retrieves a string representation of this proxied auth v1 control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this proxied auth v1 control to the provided buffer.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxiedAuthV1Control

public ProxiedAuthV1Control(ASN1OctetString rawAuthorizationDN)
Creates a new instance of the proxied authorization v1 control with the provided information.

Parameters:
rawAuthorizationDN - The raw, unprocessed authorization DN from the control value. It must not be null.

ProxiedAuthV1Control

public ProxiedAuthV1Control(DN authorizationDN)
Creates a new instance of the proxied authorization v1 control with the provided information.

Parameters:
authorizationDN - The authorization DN from the control value. It must not be null.
Method Detail

decodeControl

public static ProxiedAuthV1Control decodeControl(Control control)
                                          throws LDAPException
Creates a new proxied authorization v1 control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this proxied authorization v1 control. It must not be null.
Returns:
The proxied authorization v1 control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid proxied authorization v1 control.

getRawAuthorizationDN

public ASN1OctetString getRawAuthorizationDN()
Retrieves the raw, unprocessed authorization DN from the control value.

Returns:
The raw, unprocessed authorization DN from the control value.

setRawAuthorizationDN

public void setRawAuthorizationDN(ASN1OctetString rawAuthorizationDN)
Specifies the raw, unprocessed authorization DN for this proxied auth control.

Parameters:
rawAuthorizationDN - The raw, unprocessed authorization DN for this proxied auth control.

getAuthorizationDN

public DN getAuthorizationDN()
                      throws DirectoryException
Retrieves the authorization DN from the control value.

Returns:
The authorization DN from the control value.
Throws:
DirectoryException - If a problem occurs while attempting to decode the raw authorization DN as a DN.

setAuthorizationDN

public void setAuthorizationDN(DN authorizationDN)
Specifies the authorization DN for this proxied auth control.

Parameters:
authorizationDN - The authorizationDN for this proxied auth control. It must not be null.

getAuthorizationEntry

public Entry getAuthorizationEntry()
                            throws DirectoryException
Retrieves the authorization entry for this proxied authorization V1 control. It will also perform any necessary password policy checks to ensure that the associated user account is suitable for use in performing this processing.

Returns:
The entry for user specified as the authorization identity in this proxied authorization V1 control, or null if the authorization DN is the null DN.
Throws:
DirectoryException - If the target user does not exist or is not available for use, or if a problem occurs while making the determination.

toString

public java.lang.String toString()
Retrieves a string representation of this proxied auth v1 control.

Overrides:
toString in class Control
Returns:
A string representation of this proxied auth v1 control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this proxied auth v1 control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.