Package org.opends.server.controls
Class ProxiedAuthV1Control
- java.lang.Object
-
- org.opends.server.types.Control
-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<ProxiedAuthV1Control>DECODERThe Control Decoder that can be used to decode this control.
-
Constructor Summary
Constructors Constructor Description ProxiedAuthV1Control(boolean isCritical, ByteString rawAuthorizationDN)Creates a new instance of the proxied authorization v1 control with the provided information.ProxiedAuthV1Control(boolean isCritical, DN authorizationDN)Creates a new instance of the proxied authorization v1 control with the provided information.ProxiedAuthV1Control(ByteString 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DNgetAuthorizationDN()Retrieves the authorization DN from the control value.EntrygetAuthorizationEntry()Retrieves the authorization entry for this proxied authorization V1 control.ByteStringgetRawAuthorizationDN()Retrieves the raw, unprocessed authorization DN from the control value.voidtoString(StringBuilder buffer)Appends a string representation of this proxied auth v1 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<ProxiedAuthV1Control> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
ProxiedAuthV1Control
public ProxiedAuthV1Control(ByteString 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 benull.
-
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 benull.
-
ProxiedAuthV1Control
public ProxiedAuthV1Control(boolean isCritical, ByteString rawAuthorizationDN)Creates a new instance of the proxied authorization v1 control with the provided information.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the server processing.rawAuthorizationDN- The raw, unprocessed authorization DN from the control value.
-
ProxiedAuthV1Control
public ProxiedAuthV1Control(boolean isCritical, DN authorizationDN)Creates a new instance of the proxied authorization v1 control with the provided information.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the server processing.authorizationDN- The authorization DN from the control value. It must not benull.
-
-
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.
-
getRawAuthorizationDN
public ByteString getRawAuthorizationDN()
Retrieves the raw, unprocessed authorization DN from the control value.- Returns:
- The raw, unprocessed authorization DN from the control value.
-
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.
-
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
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)
Appends a string representation of this proxied auth v1 control to the provided buffer.
-
-