org.opends.server.controls
Class ProxiedAuthV2Control

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

public class ProxiedAuthV2Control
extends Control

This class implements version 2 of the proxied authorization control as defined in RFC 4370. It makes it possible for one user to request that an operation be performed under the authorization of another. The target user is specified using an authorization ID, which may be in the form "dn:" immediately followed by the DN of that user, or "u:" followed by a user ID string.


Constructor Summary
ProxiedAuthV2Control(ASN1OctetString authorizationID)
          Creates a new instance of the proxied authorization v2 control with the provided information.
 
Method Summary
static ProxiedAuthV2Control decodeControl(Control control)
          Creates a new proxied authorization v2 control from the contents of the provided control.
 Entry getAuthorizationEntry()
          Retrieves the authorization entry for this proxied authorization V2 control.
 ASN1OctetString getAuthorizationID()
          Retrieves the authorization ID for this proxied authorization V2 control.
 void setAuthorizationID(ASN1OctetString authorizationID)
          Specifies the authorization ID for this proxied authorization V2 control.
 java.lang.String toString()
          Retrieves a string representation of this proxied auth v2 control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this proxied auth v2 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

ProxiedAuthV2Control

public ProxiedAuthV2Control(ASN1OctetString authorizationID)
Creates a new instance of the proxied authorization v2 control with the provided information.

Parameters:
authorizationID - The authorization ID from the control value.
Method Detail

decodeControl

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

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

getAuthorizationID

public ASN1OctetString getAuthorizationID()
Retrieves the authorization ID for this proxied authorization V2 control.

Returns:
The authorization ID for this proxied authorization V2 control.

setAuthorizationID

public void setAuthorizationID(ASN1OctetString authorizationID)
Specifies the authorization ID for this proxied authorization V2 control.

Parameters:
authorizationID - The authorization ID for this proxied authorization V2 control.

getAuthorizationEntry

public Entry getAuthorizationEntry()
                            throws DirectoryException
Retrieves the authorization entry for this proxied authorization V2 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 v2 control.

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

toString

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

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