public final class BindOperation extends Operation implements PreOperationBindOperation, PreParseBindOperation, PostOperationBindOperation, PostResponseBindOperation
setAuthFailureReason(LocalizableMessage)
method, which can provide a reason for a failure in a form that
will not be returned to the client but may be written to a log file.NO_RESPONSE_CONTROLS, requestContext
Constructor and Description |
---|
BindOperation(org.forgerock.services.context.Context context,
BindRequest request)
Creates a new bind operation with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client.
|
AuthenticationInfo |
getAuthenticationInfo()
Retrieves the authentication info that resulted from processing this bind operation.
|
AuthenticationType |
getAuthenticationType()
Retrieves the authentication type for this bind operation.
|
LocalizableMessage |
getAuthFailureReason()
Retrieves a human-readable message providing the reason that the authentication failed, if available.
|
Dn |
getBindDN()
Retrieves the bind DN for this bind operation.
|
OperationType |
getOperationType()
Retrieves the operation type for this operation.
|
String |
getProtocolVersion()
Retrieves a string representation of the protocol version associated with this bind request.
|
Dn |
getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
|
ByteString |
getRawBindDN()
Retrieves the raw, unprocessed bind DN for this bind operation as contained in the client request.
|
List<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client.
|
Entry |
getSASLAuthUserEntry()
Retrieves the user entry associated with the SASL authentication attempt.
|
ByteString |
getSASLCredentials()
Retrieves the SASL credentials for this bind operation.
|
String |
getSASLMechanism()
Retrieves the SASL mechanism for this bind operation.
|
SaslServer |
getSaslServer()
Returns the
SaslServer to use by the underlying connection, or null if SASL integrity and/or
privacy protection must not be enabled. |
ByteString |
getServerSASLCredentials()
Retrieves the set of server SASL credentials to include in the bind response.
|
ByteString |
getSimplePassword()
Retrieves the simple authentication password for this bind operation.
|
Dn |
getUserEntryDN()
Retrieves the user entry DN for this bind operation.
|
void |
removeResponseControl(Control control)
Removes the provided control from the set of controls to include in the response to the client.
|
void |
run()
Performs the work of actually processing this operation.
|
void |
setAuthenticationInfo(AuthenticationInfo authInfo)
Specifies the authentication info that resulted from processing this bind operation.
|
void |
setAuthFailureReason(LocalizableMessage message)
Specifies the reason that the authentication failed.
|
void |
setProtocolVersion(String protocolVersion)
Specifies the string representation of the protocol version associated with this bind request.
|
void |
setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested.
|
void |
setRawBindDN(ByteString rawBindDN)
Specifies the raw, unprocessed bind DN for this bind operation.
|
void |
setSASLAuthUserEntry(Entry saslAuthUserEntry)
Specifies the user entry associated with the SASL authentication attempt.
|
void |
setSASLCredentials(String saslMechanism,
ByteString saslCredentials)
Specifies the SASL credentials for this bind operation.
|
void |
setSaslServer(SaslServer saslServer)
Sets the SASL server.
|
void |
setServerSASLCredentials(ByteString serverSASLCredentials)
Specifies the set of server SASL credentials to include in the bind response.
|
void |
setSimplePassword(ByteString simplePassword)
Specifies the simple authentication password for this bind operation.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this operation to the provided buffer.
|
void |
updateOperationErrMsgAndResCode()
Updates the error message and the result code of the operation.
|
addAdditionalLogItem, addPostReadResponse, addPreReadResponse, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, checkAttributeConformsToSyntax, checkIfBackendIsWritable, checkIfCanceled, createLdapException, disconnectClient, dontSynchronize, equals, evaluateProxyAuthControls, filterNonDisclosableMatchedDN, findMatchedDN, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getLocalBackend, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, hashCode, invokePostResponseCallbacks, isHumanReadable, isInnerOperation, isInternalOperation, isProxyAuthzControl, isSynchronizationOperation, mustCheckSchema, operationCompleted, processOperationResult, processOperationResult, registerPostResponseCallback, removeAllDisallowedControls, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMatchedDN, setProcessingStartTime, setProcessingStopTime, setReferralURLs, setResponseData, setResult, setResultCode, setResultCodeAndMessageNoInfoDisclosure, setSynchronizationOperation, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, setErrorMessage
addAdditionalLogItem, addRequestControl, appendErrorMessage, getAdditionalLogItems, getErrorMessage, setErrorMessage
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControl, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString
public BindOperation(org.forgerock.services.context.Context context, BindRequest request)
context
- The context with which this operation is associated.request
- The bind request.public Dn getProxiedAuthorizationDN()
Operation
getProxiedAuthorizationDN
in class Operation
null
if proxied authorization has not been requested.public void setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Operation
setProxiedAuthorizationDN
in class Operation
proxiedAuthorizationDN
- The proxied authorization DN for this operation if proxied authorization has been requested, or
null
if proxied authorization has not been requested.public AuthenticationType getAuthenticationType()
getAuthenticationType
in interface PostOperationBindOperation
getAuthenticationType
in interface PostResponseBindOperation
getAuthenticationType
in interface PreOperationBindOperation
getAuthenticationType
in interface PreParseBindOperation
public ByteString getRawBindDN()
getRawBindDN
in interface PostOperationBindOperation
getRawBindDN
in interface PostResponseBindOperation
getRawBindDN
in interface PreOperationBindOperation
getRawBindDN
in interface PreParseBindOperation
public void setRawBindDN(ByteString rawBindDN)
setRawBindDN
in interface PreParseBindOperation
rawBindDN
- The raw, unprocessed bind DN for this bind operation.public Dn getBindDN()
#getRawBindDN()
method.getBindDN
in interface PostOperationBindOperation
getBindDN
in interface PostResponseBindOperation
getBindDN
in interface PreOperationBindOperation
null
if the raw DN has not yet been processed.public ByteString getSimplePassword()
getSimplePassword
in interface PostOperationBindOperation
getSimplePassword
in interface PostResponseBindOperation
getSimplePassword
in interface PreOperationBindOperation
getSimplePassword
in interface PreParseBindOperation
public void setSimplePassword(ByteString simplePassword)
setSimplePassword
in interface PreParseBindOperation
simplePassword
- The simple authentication password for this bind operation.public String getSASLMechanism()
getSASLMechanism
in interface PostOperationBindOperation
getSASLMechanism
in interface PostResponseBindOperation
getSASLMechanism
in interface PreOperationBindOperation
getSASLMechanism
in interface PreParseBindOperation
null
if the bind does not use SASL authentication.public ByteString getSASLCredentials()
getSASLCredentials
in interface PostOperationBindOperation
getSASLCredentials
in interface PostResponseBindOperation
getSASLCredentials
in interface PreOperationBindOperation
getSASLCredentials
in interface PreParseBindOperation
null
if there are none or if the bind does not
use SASL authentication.public void setSASLCredentials(String saslMechanism, ByteString saslCredentials)
setSASLCredentials
in interface PreParseBindOperation
saslMechanism
- The SASL mechanism for this bind operation.saslCredentials
- The SASL credentials for this bind operation, or null
if there are none.public ByteString getServerSASLCredentials()
getServerSASLCredentials
in interface PostOperationBindOperation
getServerSASLCredentials
in interface PostResponseBindOperation
null
if there are none.public void setServerSASLCredentials(ByteString serverSASLCredentials)
setServerSASLCredentials
in interface PostOperationBindOperation
setServerSASLCredentials
in interface PreOperationBindOperation
setServerSASLCredentials
in interface PreParseBindOperation
serverSASLCredentials
- The set of server SASL credentials to include in the bind response.public Entry getSASLAuthUserEntry()
getSASLAuthUserEntry
in interface PostOperationBindOperation
getSASLAuthUserEntry
in interface PostResponseBindOperation
null
if it was not a SASL
authentication or the SASL processing was not able to map the request to a user.public void setSASLAuthUserEntry(Entry saslAuthUserEntry)
saslAuthUserEntry
- The user entry associated with the SASL authentication attempt.public LocalizableMessage getAuthFailureReason()
getAuthFailureReason
in interface PostOperationBindOperation
getAuthFailureReason
in interface PostResponseBindOperation
null
if none is
available.public void setAuthFailureReason(LocalizableMessage message)
setAuthFailureReason
in interface PostOperationBindOperation
setAuthFailureReason
in interface PreOperationBindOperation
setAuthFailureReason
in interface PreParseBindOperation
message
- providing the reason that the authentication failed.public Dn getUserEntryDN()
getUserEntryDN
in interface PostOperationBindOperation
getUserEntryDN
in interface PostResponseBindOperation
getUserEntryDN
in interface PreOperationBindOperation
null
if the bind processing has not progressed far
enough to identify the user or if the user DN could not be determined.public AuthenticationInfo getAuthenticationInfo()
public void setAuthenticationInfo(AuthenticationInfo authInfo)
processSASLBind
method.authInfo
- The authentication info that resulted from processing this bind operation.public OperationType getOperationType()
PluginOperation
getOperationType
in interface PluginOperation
public List<Control> getResponseControls()
PluginOperation
getResponseControls
in interface PluginOperation
public void addResponseControl(Control control)
Operation
addResponseControl
in interface PostOperationOperation
addResponseControl
in interface PreOperationOperation
addResponseControl
in interface PreParseOperation
addResponseControl
in class Operation
control
- The control to add to the set of controls to include in the response to the client.public void removeResponseControl(Control control)
Operation
removeResponseControl
in interface PostOperationOperation
removeResponseControl
in interface PreOperationOperation
removeResponseControl
in interface PreParseOperation
removeResponseControl
in class Operation
control
- The control to remove from the set of controls to include in the response to the client.public void toString(StringBuilder buffer)
Operation
toString
in interface PluginOperation
toString
in class Operation
buffer
- The buffer into which a string representation of this operation should be appended.public String getProtocolVersion()
getProtocolVersion
in interface PostOperationBindOperation
getProtocolVersion
in interface PostResponseBindOperation
getProtocolVersion
in interface PreOperationBindOperation
getProtocolVersion
in interface PreParseBindOperation
public void setProtocolVersion(String protocolVersion)
setProtocolVersion
in interface PreParseBindOperation
protocolVersion
- The string representation of the protocol version associated with this bind request.public void run()
Operation
public void updateOperationErrMsgAndResCode()
Operation
updateOperationErrMsgAndResCode
in class Operation
public SaslServer getSaslServer()
SaslServer
to use by the underlying connection, or null
if SASL integrity and/or
privacy protection must not be enabled.SaslServer
to use by the underlying connection, or null
if SASL integrity and/or
privacy protection must not enabled.public void setSaslServer(SaslServer saslServer)
saslServer
- the SASL server to setCopyright 2010-2018 ForgeRock AS.