@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class GetAuthorizationEntryRequestControl extends Control
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
GetAuthorizationEntryRequest ::= SEQUENCE { includeAuthNEntry [0] BOOLEAN DEFAULT TRUE, includeAuthZEntry [1] BOOLEAN DEFAULT TRUE, attributes [2] AttributeSelection OPTIONAL }
ReadOnlyEntry authNEntry = null; ReadOnlyEntry authZEntry = null; BindRequest bindRequest = new SimpleBindRequest( "uid=john.doe,ou=People,dc=example,dc=com", "password", new GetAuthorizationEntryRequestControl()); BindResult bindResult = connection.bind(bindRequest); GetAuthorizationEntryResponseControl c = GetAuthorizationEntryResponseControl.get(bindResult); if (c != null) { authNEntry = c.getAuthNEntry(); authZEntry = c.getAuthZEntry(); }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GET_AUTHORIZATION_ENTRY_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.6) for the get authorization entry request
control.
|
Constructor and Description |
---|
GetAuthorizationEntryRequestControl()
Creates a new get authorization entry request control that will request all
user attributes in both the authentication and authorization entries.
|
GetAuthorizationEntryRequestControl(boolean isCritical,
boolean includeAuthNEntry,
boolean includeAuthZEntry,
java.util.List<java.lang.String> attributes)
Creates a new get authorization entry request control with the provided
information.
|
GetAuthorizationEntryRequestControl(boolean isCritical,
boolean includeAuthNEntry,
boolean includeAuthZEntry,
java.lang.String... attributes)
Creates a new get authorization entry request control with the provided
information.
|
GetAuthorizationEntryRequestControl(boolean includeAuthNEntry,
boolean includeAuthZEntry,
java.util.List<java.lang.String> attributes)
Creates a new get authorization entry request control with the provided
information.
|
GetAuthorizationEntryRequestControl(boolean includeAuthNEntry,
boolean includeAuthZEntry,
java.lang.String... attributes)
Creates a new get authorization entry request control with the provided
information.
|
GetAuthorizationEntryRequestControl(Control control)
Creates a new get authorization entry request control which is decoded from
the provided generic control.
|
Modifier and Type | Method and Description |
---|---|
static GetAuthorizationEntryRequestControl |
decodeJSONControl(JSONObject controlObject,
boolean strict)
Attempts to decode the provided object as a JSON representation of a get
authorization entry request control.
|
java.util.List<java.lang.String> |
getAttributes()
Retrieves the attributes that will be requested for the authentication
and/or authorization entries.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
boolean |
includeAuthNEntry()
Indicates whether the entry for the authenticated user should be included
in the response control.
|
boolean |
includeAuthZEntry()
Indicates whether the entry for the authorized user should be included
in the response control.
|
JSONObject |
toJSONControl()
Retrieves a representation of this get authorization entry request control
as a JSON object.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
@NotNull public static final java.lang.String GET_AUTHORIZATION_ENTRY_REQUEST_OID
public GetAuthorizationEntryRequestControl()
public GetAuthorizationEntryRequestControl(boolean includeAuthNEntry, boolean includeAuthZEntry, @Nullable java.lang.String... attributes)
includeAuthNEntry
- Indicates whether to include the authentication
entry in the response.includeAuthZEntry
- Indicates whether to include the authorization
entry in the response.attributes
- The attributes to include in the entries in the
response. It may be empty or null
to
request all user attributes.public GetAuthorizationEntryRequestControl(boolean includeAuthNEntry, boolean includeAuthZEntry, @Nullable java.util.List<java.lang.String> attributes)
includeAuthNEntry
- Indicates whether to include the authentication
entry in the response.includeAuthZEntry
- Indicates whether to include the authorization
entry in the response.attributes
- The attributes to include in the entries in the
response. It may be empty or null
to
request all user attributes.public GetAuthorizationEntryRequestControl(boolean isCritical, boolean includeAuthNEntry, boolean includeAuthZEntry, @Nullable java.lang.String... attributes)
isCritical
- Indicates whether the control should be marked
critical.includeAuthNEntry
- Indicates whether to include the authentication
entry in the response.includeAuthZEntry
- Indicates whether to include the authorization
entry in the response.attributes
- The attributes to include in the entries in the
response. It may be empty or null
to
request all user attributes.public GetAuthorizationEntryRequestControl(boolean isCritical, boolean includeAuthNEntry, boolean includeAuthZEntry, @Nullable java.util.List<java.lang.String> attributes)
isCritical
- Indicates whether the control should be marked
critical.includeAuthNEntry
- Indicates whether to include the authentication
entry in the response.includeAuthZEntry
- Indicates whether to include the authorization
entry in the response.attributes
- The attributes to include in the entries in the
response. It may be empty or null
to
request all user attributes.public GetAuthorizationEntryRequestControl(@NotNull Control control) throws LDAPException
control
- The generic control to decode as a get authorization entry
request control.LDAPException
- If the provided control cannot be decoded as a get
authorization entry request control.public boolean includeAuthNEntry()
true
if the entry for the authenticated user should be
included in the response control, or false
if not.public boolean includeAuthZEntry()
true
if the entry for the authorized user should be
included in the response control, or false
if not.@NotNull public java.util.List<java.lang.String> getAttributes()
@NotNull public java.lang.String getControlName()
getControlName
in class Control
@NotNull public JSONObject toJSONControl()
oid
-- A mandatory string field whose value is the object
identifier for this control. For the get authorization entry request
control, the OID is "1.3.6.1.4.1.30221.2.5.6".
control-name
-- An optional string field whose value is a
human-readable name for this control. This field is only intended for
descriptive purposes, and when decoding a control, the oid
field should be used to identify the type of control.
criticality
-- A mandatory Boolean field used to indicate
whether this control is considered critical.
value-base64
-- An optional string field whose value is a
base64-encoded representation of the raw value for this get
authorization entry request control. Exactly one of the
value-base64
and value-json
fields must be present.
value-json
-- An optional JSON object field whose value is a
user-friendly representation of the value for this get authorization
entry request control. Exactly one of the value-base64
and
value-json
fields must be present, and if the
value-json
field is used, then it will use the following
fields:
include-authentication-entry
-- A mandatory Boolean field
that indicates whether to include the entry for the authentication
identity in the response control.
include-authorization-entry
-- A mandatory Boolean field
that indicates whether to include the entry for the authorization
identity in the response control.
attributes
-- An optional array field whose values are
strings that represent the names of the attributes that should be
included in the entries returned in the repsonse control.
toJSONControl
in class Control
@NotNull public static GetAuthorizationEntryRequestControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException
controlObject
- The JSON object to be decoded. It must not be
null
.strict
- Indicates whether to use strict mode when decoding
the provided JSON object. If this is true
,
then this method will throw an exception if the
provided JSON object contains any unrecognized
fields. If this is false
, then unrecognized
fields will be ignored.LDAPException
- If the provided JSON object cannot be parsed as a
valid get authorization entry request control.