Package org.opends.server.controls
Class ProxiedAuthV2Control
- java.lang.Object
-
- org.opends.server.types.Control
-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<ProxiedAuthV2Control>DECODERThe Control Decoder that can be used to decode this control.
-
Constructor Summary
Constructors Constructor Description ProxiedAuthV2Control(boolean isCritical, ByteString authorizationID)Creates a new instance of the proxied authorization v2 control with the provided information.ProxiedAuthV2Control(ByteString authorizationID)Creates a new instance of the proxied authorization v2 control with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntrygetAuthorizationEntry()Retrieves the authorization entry for this proxied authorization V2 control.ByteStringgetAuthorizationID()Retrieves the authorization ID for this proxied authorization V2 control.voidtoString(StringBuilder buffer)Appends a string representation of this control to the provided buffer.protected voidwriteValue(ASN1Writer writer)Writes this control's value to an ASN.1 writer.-
Methods inherited from class org.opends.server.types.Control
getOID, isCritical, toString, write
-
-
-
-
Field Detail
-
DECODER
public static final ControlDecoder<ProxiedAuthV2Control> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
ProxiedAuthV2Control
public ProxiedAuthV2Control(ByteString authorizationID)
Creates a new instance of the proxied authorization v2 control with the provided information.- Parameters:
authorizationID- The authorization ID from the control value.
-
ProxiedAuthV2Control
public ProxiedAuthV2Control(boolean isCritical, ByteString authorizationID)Creates a new instance of the proxied authorization v2 control with the provided information.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the server processing.authorizationID- The authorization ID from the control value.
-
-
Method Detail
-
writeValue
protected void writeValue(ASN1Writer writer) throws IOException
Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.- Specified by:
writeValuein classControl- Parameters:
writer- The ASN.1 writer to use.- Throws:
IOException- If a problem occurs while writing to the stream.
-
getAuthorizationID
public ByteString getAuthorizationID()
Retrieves the authorization ID for this proxied authorization V2 control.- Returns:
- 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
nullif 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 void toString(StringBuilder buffer)
Description copied from class:ControlAppends a string representation of this control to the provided buffer.
-
-