org.opends.server.core
Class BindOperationWrapper

java.lang.Object
  extended by org.opends.server.core.OperationWrapper
      extended by org.opends.server.core.BindOperationWrapper
All Implemented Interfaces:
BindOperation, Operation
Direct Known Subclasses:
LocalBackendBindOperation

public abstract class BindOperationWrapper
extends OperationWrapper
implements BindOperation

This abstract class wraps/decorates a given bind operation. This class will be extended by sub-classes to enhance the functionnality of the BindOperationBasis.


Field Summary
 
Fields inherited from interface org.opends.server.types.Operation
LOCALBACKENDOPERATIONS
 
Constructor Summary
protected BindOperationWrapper(BindOperation bind)
          Creates a new bind operation based on the provided bind operation.
 
Method Summary
 AuthenticationInfo getAuthenticationInfo()
          Retrieves the authentication info that resulted from processing this bind operation.
 AuthenticationType getAuthenticationType()
          Retrieves the authentication type for this bind operation.
 Message 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.
 java.lang.String getProtocolVersion()
          Retrieves a string representation of the protocol version associated with this bind request.
 ByteString getRawBindDN()
          Retrieves the raw, unprocessed bind DN for this bind operation as contained in the client request.
 Entry getSASLAuthUserEntry()
          Retrieves the user entry associated with the SASL authentication attempt.
 ASN1OctetString getSASLCredentials()
          Retrieves the SASL credentials for this bind operation.
 java.lang.String getSASLMechanism()
          Retrieves the SASL mechanism for this bind operation.
 ASN1OctetString 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 setAuthenticationInfo(AuthenticationInfo authInfo)
          Specifies the authentication info that resulted from processing this bind operation.
 void setAuthFailureReason(Message reason)
          Specifies the reason that the authentication failed.
 void setProtocolVersion(java.lang.String protocolVersion)
          Specifies the string representation of the protocol version associated with this bind request.
 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(java.lang.String saslMechanism, ASN1OctetString saslCredentials)
          Specifies the SASL credentials for this bind operation.
 void setServerSASLCredentials(ASN1OctetString 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 setUserEntryDN(DN userEntryDN)
          Set the user entry DN for this bind operation.
 java.lang.String toString()
          Retrieves a string representation of this operation.
 
Methods inherited from class org.opends.server.core.OperationWrapper
abort, addRequestControl, addResponseControl, appendAdditionalLogMessage, appendErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogMessage, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getCommonLogElements, getConnectionID, getErrorMessage, getMatchedDN, getMessageID, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControls, getRequestLogElements, getResponseControls, getResponseLogElements, getResultCode, isInternalOperation, isSynchronizationOperation, operationCompleted, removeAttachment, removeRequestControl, removeResponseControl, setAdditionalLogMessage, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInternalOperation, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opends.server.types.Operation
abort, addRequestControl, addResponseControl, appendAdditionalLogMessage, appendErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogMessage, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getCommonLogElements, getConnectionID, getErrorMessage, getMatchedDN, getMessageID, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControls, getRequestLogElements, getResponseControls, getResponseLogElements, getResultCode, isInternalOperation, isSynchronizationOperation, operationCompleted, removeAttachment, removeRequestControl, removeResponseControl, setAdditionalLogMessage, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInternalOperation, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
 

Constructor Detail

BindOperationWrapper

protected BindOperationWrapper(BindOperation bind)
Creates a new bind operation based on the provided bind operation.

Parameters:
bind - The bind operation to wrap
Method Detail

getAuthenticationInfo

public AuthenticationInfo getAuthenticationInfo()
Retrieves the authentication info that resulted from processing this bind operation. It will only be valid if the bind processing was successful.

Specified by:
getAuthenticationInfo in interface BindOperation
Returns:
The authentication info that resulted from processing this bind operation.

getAuthenticationType

public AuthenticationType getAuthenticationType()
Retrieves the authentication type for this bind operation.

Specified by:
getAuthenticationType in interface BindOperation
Returns:
The authentication type for this bind operation.

getAuthFailureReason

public Message getAuthFailureReason()
Retrieves a human-readable message providing the reason that the authentication failed, if available.

Specified by:
getAuthFailureReason in interface BindOperation
Returns:
A human-readable message providing the reason that the authentication failed, or null if none is available.

getBindDN

public DN getBindDN()
Retrieves the bind DN for this bind operation. This method should not be called by pre-parse plugins, as the raw value will not have been processed by that time. Instead, pre-parse plugins should call the getRawBindDN method.

Specified by:
getBindDN in interface BindOperation
Returns:
The bind DN for this bind operation, or null if the raw DN has not yet been processed.

getRawBindDN

public ByteString getRawBindDN()
Retrieves the raw, unprocessed bind DN for this bind operation as contained in the client request. The value may not actually contain a valid DN, as no validation will have been performed.

Specified by:
getRawBindDN in interface BindOperation
Returns:
The raw, unprocessed bind DN for this bind operation as contained in the client request.

getSASLAuthUserEntry

public Entry getSASLAuthUserEntry()
Retrieves the user entry associated with the SASL authentication attempt. This should be set by any SASL mechanism in which the processing was able to get far enough to make this determination, regardless of whether the authentication was ultimately successful.

Specified by:
getSASLAuthUserEntry in interface BindOperation
Returns:
The user entry associated with the SASL authentication attempt, or null if it was not a SASL authentication or the SASL processing was not able to map the request to a user.

getSASLCredentials

public ASN1OctetString getSASLCredentials()
Retrieves the SASL credentials for this bind operation.

Specified by:
getSASLCredentials in interface BindOperation
Returns:
The SASL credentials for this bind operation, or null if there are none or if the bind does not use SASL authentication.

getSASLMechanism

public java.lang.String getSASLMechanism()
Retrieves the SASL mechanism for this bind operation.

Specified by:
getSASLMechanism in interface BindOperation
Returns:
The SASL mechanism for this bind operation, or null if the bind does not use SASL authentication.

getServerSASLCredentials

public ASN1OctetString getServerSASLCredentials()
Retrieves the set of server SASL credentials to include in the bind response.

Specified by:
getServerSASLCredentials in interface BindOperation
Returns:
The set of server SASL credentials to include in the bind response, or null if there are none.

getSimplePassword

public ByteString getSimplePassword()
Retrieves the simple authentication password for this bind operation.

Specified by:
getSimplePassword in interface BindOperation
Returns:
The simple authentication password for this bind operation.

getUserEntryDN

public DN getUserEntryDN()
Retrieves the user entry DN for this bind operation. It will only be available if the bind processing has proceeded far enough to identify the user attempting to authenticate.

Specified by:
getUserEntryDN in interface BindOperation
Returns:
The user entry DN for this bind operation, or null if the bind processing has not progressed far enough to identify the user or if the user DN could not be determined.

setAuthenticationInfo

public void setAuthenticationInfo(AuthenticationInfo authInfo)
Specifies the authentication info that resulted from processing this bind operation. This method must only be called by SASL mechanism handlers during the course of processing the processSASLBind method.

Specified by:
setAuthenticationInfo in interface BindOperation
Parameters:
authInfo - The authentication info that resulted from processing this bind operation.

setAuthFailureReason

public void setAuthFailureReason(Message reason)
Specifies the reason that the authentication failed.

Specified by:
setAuthFailureReason in interface BindOperation
Parameters:
reason - providing the reason that the authentication failed.

setRawBindDN

public void setRawBindDN(ByteString rawBindDN)
Specifies the raw, unprocessed bind DN for this bind operation. This should only be called by pre-parse plugins.

Specified by:
setRawBindDN in interface BindOperation
Parameters:
rawBindDN - The raw, unprocessed bind DN for this bind operation.

setSASLAuthUserEntry

public void setSASLAuthUserEntry(Entry saslAuthUserEntry)
Specifies the user entry associated with the SASL authentication attempt. This should be set by any SASL mechanism in which the processing was able to get far enough to make this determination, regardless of whether the authentication was ultimately successful.

Specified by:
setSASLAuthUserEntry in interface BindOperation
Parameters:
saslAuthUserEntry - The user entry associated with the SASL authentication attempt.

setSASLCredentials

public void setSASLCredentials(java.lang.String saslMechanism,
                               ASN1OctetString saslCredentials)
Specifies the SASL credentials for this bind operation.

Specified by:
setSASLCredentials in interface BindOperation
Parameters:
saslMechanism - The SASL mechanism for this bind operation.
saslCredentials - The SASL credentials for this bind operation, or null if there are none.

setServerSASLCredentials

public void setServerSASLCredentials(ASN1OctetString serverSASLCredentials)
Specifies the set of server SASL credentials to include in the bind response.

Specified by:
setServerSASLCredentials in interface BindOperation
Parameters:
serverSASLCredentials - The set of server SASL credentials to include in the bind response.

setSimplePassword

public void setSimplePassword(ByteString simplePassword)
Specifies the simple authentication password for this bind operation.

Specified by:
setSimplePassword in interface BindOperation
Parameters:
simplePassword - The simple authentication password for this bind operation.

setUserEntryDN

public void setUserEntryDN(DN userEntryDN)
Set the user entry DN for this bind operation.

Specified by:
setUserEntryDN in interface BindOperation
Parameters:
userEntryDN - The user entry DN for this bind operation, or null if the bind processing has not progressed far enough to identify the user or if the user DN could not be determined.

toString

public java.lang.String toString()
Retrieves a string representation of this operation.

Specified by:
toString in interface Operation
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this operation.

setProtocolVersion

public void setProtocolVersion(java.lang.String protocolVersion)
Specifies the string representation of the protocol version associated with this bind request.

Specified by:
setProtocolVersion in interface BindOperation
Parameters:
protocolVersion - The string representation of the protocol version associated with this bind request.

getProtocolVersion

public java.lang.String getProtocolVersion()
Retrieves a string representation of the protocol version associated with this bind request.

Specified by:
getProtocolVersion in interface BindOperation
Returns:
A string representation of the protocol version associated with this bind request.