@ThreadSafety(level=NOT_THREADSAFE) public final class UnboundIDExternallyProcessedAuthenticationBindRequest extends SASLBindRequest
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 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.
ExternallyProcessedAuthenticationCredentials ::= SEQUENCE { authenticationID [0] OCTET STRING, externalMechanismName [1] OCTET STRING, externalAuthenticationWasSuccessful [2] BOOLEAN, externalAuthenticationFailureReason [3] OCTET STRING OPTIONAL, externalAuthenticationWasPasswordBased [4] BOOLEAN DEFAULT TRUE, externalAuthenticationWasSecure [5] BOOLEAN DEFAULT FALSE, endClientIPAddress [6] OCTET STRING OPTIONAL, additionalAccessLogProperties [7] SEQUENCE OF SEQUENCE { propertyName OCTET STRING, propertyValue OCTET STRING } OPTIONAL, ... }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNBOUNDID_EXTERNALLY_PROCESSED_AUTH_MECHANISM_NAME
The name for the UnboundID externally-processed authentication SASL
mechanism.
|
CRED_TYPE_SASL
VERSION_ELEMENT
Constructor and Description |
---|
UnboundIDExternallyProcessedAuthenticationBindRequest(java.lang.String authenticationID,
java.lang.String externalMechanismName,
boolean externalAuthWasSuccessful,
java.lang.String externalAuthFailureReason,
boolean externalAuthWasPasswordBased,
boolean externalAuthWasSecure,
java.lang.String endClientIPAddress,
java.util.Map<java.lang.String,java.lang.String> additionalAccessLogProperties,
Control... controls)
Creates a new UNBOUNDID-EXTERNALLY-PROCESSED-AUTHENTICATION bind request
with the provided information.
|
Modifier and Type | Method and Description |
---|---|
static UnboundIDExternallyProcessedAuthenticationBindRequest |
decodeSASLCredentials(ASN1OctetString saslCredentials,
Control... controls)
Creates a new UNBOUNDID-EXTERNALLY-PROCESSED-AUTHENTICATION bind request
decoded from the provided information.
|
UnboundIDExternallyProcessedAuthenticationBindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
UnboundIDExternallyProcessedAuthenticationBindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
boolean |
externalAuthenticationWasPasswordBased()
Indicates whether the external authentication processing involved a
password.
|
boolean |
externalAuthenticationWasSecure()
Indicates whether the external authentication processing is considered to
have been secure.
|
boolean |
externalAuthenticationWasSuccessful()
Indicates whether the external authentication attempt is considered to have
been successful.
|
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalAccessLogProperties()
Retrieves a map of additional properties that should be recorded in the
server's access log for the external authentication attempt.
|
java.lang.String |
getAuthenticationID()
Retrieves the authentication ID that identifies the user for whom the
external authentication processing was performed.
|
ASN1OctetString |
getEncodedCredentials()
Retrieves an encoded representation of the SASL credentials for this bind
request.
|
java.lang.String |
getEndClientIPAddress()
Retrieves the IPv4 or IPv6 address of the end client involved in the
external authentication processing, if available.
|
java.lang.String |
getExternalAuthenticationFailureReason()
Retrieves the reason that the external authentication attempt was
considered a failure, if available.
|
java.lang.String |
getExternalMechanismName()
Retrieves the name of the mechanism used for the external authentication
attempt.
|
int |
getLastMessageID()
Retrieves the message ID for the last LDAP message sent using this request.
|
UnboundIDExternallyProcessedAuthenticationBindRequest |
getRebindRequest(java.lang.String host,
int port)
Retrieves a bind request that may be used to re-bind using the same
credentials authentication type and credentials as previously used to
perform the initial bind.
|
java.lang.String |
getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request.
|
protected BindResult |
process(LDAPConnection connection,
int depth)
Sends this bind request to the target server over the provided connection
and returns the corresponding response.
|
void |
toCode(java.util.List<java.lang.String> lineList,
java.lang.String requestID,
int indentSpaces,
boolean includeProcessing)
Appends a number of lines comprising the Java source code that can be used
to recreate this request to the given list.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
getBindType, responseReceived, sendBindRequest, sendMessage
getOperationType
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setResponseTimeoutMillis, toString
public static final java.lang.String UNBOUNDID_EXTERNALLY_PROCESSED_AUTH_MECHANISM_NAME
public UnboundIDExternallyProcessedAuthenticationBindRequest(java.lang.String authenticationID, java.lang.String externalMechanismName, boolean externalAuthWasSuccessful, java.lang.String externalAuthFailureReason, boolean externalAuthWasPasswordBased, boolean externalAuthWasSecure, java.lang.String endClientIPAddress, java.util.Map<java.lang.String,java.lang.String> additionalAccessLogProperties, Control... controls)
authenticationID
- The authentication ID that
identifies the user for whom the
external authentication processing
was performed. This should be
either "dn:" followed by the DN of
the target user's entry, or "u:"
followed by a username. This must
not be null
.externalMechanismName
- The name of the mechanism used for
the external authentication attempt.
This must not be null
.externalAuthWasSuccessful
- Indicates whether the external
authentication attempt is considered
to have been successful.externalAuthFailureReason
- The reason that the external
authentication attempt was
considered a failure. This should
be null
if the external
authentication attempt succeeded,
and may be null
if the
external authentication attempt
failed but no failure reason is
available.externalAuthWasPasswordBased
- Indicates whether the external
authentication processing involved a
password.externalAuthWasSecure
- Indicates whether the external
authentication processing was
considered secure. A mechanism
should only be considered secure if
all credentials were protected in
all communication.endClientIPAddress
- The IPv4 or IPv6 address of the end
client involved in the external
authentication processing. This may
be null
if the end client
address is not available.additionalAccessLogProperties
- A map of additional properties that
should be recorded in the server's
access log for the external
authentication attempt. This may be
null
or empty if no
additional access log properties are
required.controls
- The set of controls to include in
the request. It may be null
or empty if no request controls are
needed.public static UnboundIDExternallyProcessedAuthenticationBindRequest decodeSASLCredentials(ASN1OctetString saslCredentials, Control... controls) throws LDAPException
saslCredentials
- The encoded SASL credentials to be decoded. It
must not be null
.controls
- The set of controls to include in the request. It
may be null
or empty if no request
controls are needed.LDAPException
- If the provided SASL credentials are not valid for
am UNBOUNDID-EXTERNALLY-PROCESSED-AUTHENTICATION
bind requestpublic java.lang.String getAuthenticationID()
public java.lang.String getExternalMechanismName()
public boolean externalAuthenticationWasSuccessful()
true
if the external authentication attempt was considered
successful, or false
if not.public java.lang.String getExternalAuthenticationFailureReason()
null
if no failure reason is available.public boolean externalAuthenticationWasPasswordBased()
true
if the external authentication processing involved a
password, or false
if not.public boolean externalAuthenticationWasSecure()
true
if the external authentication processing was
considered secure, or false
if not.public java.lang.String getEndClientIPAddress()
null
if this is not
available.public java.util.Map<java.lang.String,java.lang.String> getAdditionalAccessLogProperties()
public java.lang.String getSASLMechanismName()
getSASLMechanismName
in class SASLBindRequest
public ASN1OctetString getEncodedCredentials()
protected BindResult process(LDAPConnection connection, int depth) throws LDAPException
process
in class BindRequest
connection
- The connection to use to send this bind request to the
server and read the associated response.depth
- The current referral depth for this request. It should
always be one for the initial request, and should only
be incremented when following referrals.LDAPException
- If a problem occurs while sending the request or
reading the response.public int getLastMessageID()
getLastMessageID
in class SASLBindRequest
public UnboundIDExternallyProcessedAuthenticationBindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
public UnboundIDExternallyProcessedAuthenticationBindRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
controls
- The set of controls to include in the duplicate request.public UnboundIDExternallyProcessedAuthenticationBindRequest getRebindRequest(java.lang.String host, int port)
getRebindRequest
in class BindRequest
host
- The address of the directory server to which the connection
is established.port
- The port of the directory server to which the connection is
established.null
to indicate that automatic
re-binding is not supported for this type of bind request.public void toString(java.lang.StringBuilder buffer)
toString
in interface ReadOnlyLDAPRequest
toString
in class LDAPRequest
buffer
- The buffer to which to append a string representation of
this request.public void toCode(java.util.List<java.lang.String> lineList, java.lang.String requestID, int indentSpaces, boolean includeProcessing)
toCode
in interface ReadOnlyLDAPRequest
toCode
in class SASLBindRequest
lineList
- The list to which the source code lines should
be added.requestID
- The name that should be used as an identifier
for the request. If this is null
or
empty, then a generic ID will be used.indentSpaces
- The number of spaces that should be used to
indent the generated code. It must not be
negative.includeProcessing
- Indicates whether the generated code should
include code required to actually process the
request and handle the result (if true
),
or just to generate the request (if
false
).