public interface BindResult extends Result
A successful Bind operation is indicated by a Bind result with a result code
set to ResultCode.SUCCESS
and can be determined by invoking the
isSuccess()
method.
The server SASL credentials field is used as part of a SASL-defined bind mechanism to allow the client to authenticate the server to which it is communicating, or to perform "challenge-response" authentication. If the client bound using a form of simple authentication, or the SASL mechanism does not require the server to return information to the client, then this field shall not be included in the Bind result.
If the server requires the client to send a new SASL Bind request in order to
continue the authentication process then the result code is set to
ResultCode.SASL_BIND_IN_PROGRESS
and can be determined by invoking
the isSASLBindInProgress()
method.
Modifier and Type | Method and Description |
---|---|
BindResult |
addControl(Control control)
Adds the provided control to this response.
|
BindResult |
addReferralURI(String uri)
Adds the provided referral URI to this result.
|
Throwable |
getCause()
Returns the throwable cause associated with this result if available.
|
<C extends Control> |
getControl(ControlDecoder<C> decoder,
DecodeOptions options)
Decodes and returns the first control in this response having an OID
corresponding to the provided control decoder.
|
List<Control> |
getControls()
Returns a
List containing the controls included with this
response. |
String |
getDiagnosticMessage()
Returns the diagnostic message associated with this result.
|
String |
getMatchedDN()
Returns the matched DN associated with this result.
|
List<String> |
getReferralURIs()
Returns a
List containing the referral URIs included with this
result. |
ResultCode |
getResultCode()
Returns the result code associated with this result.
|
ByteString |
getServerSASLCredentials()
Returns the server SASL credentials associated with this bind result.
|
boolean |
isReferral()
Indicates whether a referral needs to be chased in order to
complete the operation.
|
boolean |
isSASLBindInProgress()
Indicates whether the server requires the client to send a new
SASL Bind request with the same SASL mechanism in order to continue the
authentication process.
|
boolean |
isSuccess()
Indicates whether the request succeeded or not.
|
BindResult |
setCause(Throwable cause)
Sets the throwable cause associated with this result if available.
|
BindResult |
setDiagnosticMessage(String message)
Sets the diagnostic message associated with this result.
|
BindResult |
setMatchedDN(String dn)
Sets the matched DN associated with this result.
|
BindResult |
setResultCode(ResultCode resultCode)
Sets the result code associated with this result.
|
BindResult |
setServerSASLCredentials(ByteString credentials)
Sets the server SASL credentials associated with this bind result.
|
containsControl
BindResult addControl(Control control)
Response
addControl
in interface Response
addControl
in interface Result
control
- The control to be added.BindResult addReferralURI(String uri)
Result
addReferralURI
in interface Result
uri
- The referral URI to be added.Throwable getCause()
Result
<C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
Response
getControl
in interface Response
getControl
in interface Result
C
- The type of control to be decoded and returned.decoder
- The control decoder.options
- The set of decode options which should be used when decoding
the control.null
if the control is not
included with this response.DecodeException
- If the control could not be decoded because it was malformed
in some way (e.g. the control value was missing, or its
content could not be decoded).List<Control> getControls()
Response
List
containing the controls included with this
response. The returned List
may be modified if permitted by this
response.getControls
in interface Response
getControls
in interface Result
List
containing the controls.String getDiagnosticMessage()
Result
getDiagnosticMessage
in interface Result
null
).String getMatchedDN()
Result
getMatchedDN
in interface Result
null
).List<String> getReferralURIs()
Result
List
containing the referral URIs included with this
result. The returned List
may be modified if permitted by this
result.getReferralURIs
in interface Result
List
containing the referral URIs.ResultCode getResultCode()
Result
getResultCode
in interface Result
ByteString getServerSASLCredentials()
null
indicating that none
was provided.boolean isReferral()
Result
Specifically, this method returns true
if the result code is
equal to ResultCode.REFERRAL
.
isReferral
in interface Result
true
if a referral needs to be chased, otherwise
false
.boolean isSASLBindInProgress()
Specifically, this method returns true
if the result code is
equal to ResultCode.SASL_BIND_IN_PROGRESS
.
true
if the server requires the client to send a new SASL
Bind request, otherwise false
.boolean isSuccess()
Result
BindResult setCause(Throwable cause)
Result
BindResult setDiagnosticMessage(String message)
Result
setDiagnosticMessage
in interface Result
message
- The diagnostic message, which may be empty or null
indicating that none was provided.BindResult setMatchedDN(String dn)
Result
setMatchedDN
in interface Result
dn
- The matched DN associated, which may be empty or null
indicating that none was provided.BindResult setResultCode(ResultCode resultCode)
Result
setResultCode
in interface Result
resultCode
- The result code.BindResult setServerSASLCredentials(ByteString credentials)
credentials
- The server SASL credentials associated with this bind result,
which may be null
indicating that none was provided.UnsupportedOperationException
- If this bind result does not permit the server SASL
credentials to be set.Copyright 2010-2017 ForgeRock AS.