Interface GenericBindRequest
- All Superinterfaces:
BindRequest,Request
ResultCode.AUTH_METHOD_NOT_SUPPORTED.-
Field Summary
Fields inherited from interface org.forgerock.opendj.ldap.requests.BindRequest
AUTHENTICATION_TYPE_SASL, AUTHENTICATION_TYPE_SIMPLE -
Method Summary
Modifier and TypeMethodDescriptionaddControl(Control control) Adds the provided control to this request.createBindClient(String serverName) Creates a new bind client which can be used to perform the authentication process.byteReturns the authentication mechanism identifier for this generic bind request as defined by the LDAP protocol.byte[]Returns the authentication information for this bind request.<C extends Control>
CgetControl(ControlDecoder<C> decoder, DecodeOptions options) Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.Returns aListcontaining the controls included with this request.getName()Returns the name of the Directory object that the client wishes to bind as.setAuthenticationType(byte type) Sets the authentication mechanism identifier for this generic bind request.setAuthenticationValue(byte[] bytes) Sets the authentication information for this generic bind request in a form defined by the authentication mechanism.Sets the name of the Directory object that the client wishes to bind as.Methods inherited from interface org.forgerock.opendj.ldap.requests.Request
containsControl
-
Method Details
-
addControl
Description copied from interface:RequestAdds the provided control to this request.- Specified by:
addControlin interfaceBindRequest- Specified by:
addControlin interfaceRequest- Parameters:
control- The control to be added to this request.- Returns:
- This request.
-
createBindClient
Description copied from interface:BindRequestCreates a new bind client which can be used to perform the authentication process. This method is called by protocol implementations and is not intended for use by applications.- Specified by:
createBindClientin interfaceBindRequest- Parameters:
serverName- The non-null fully-qualified host name of the server to authenticate to.- Returns:
- The new bind client.
- Throws:
LdapException- If an error occurred while creating the bind client context.
-
getAuthenticationType
byte getAuthenticationType()Description copied from interface:BindRequestReturns the authentication mechanism identifier for this generic bind request as defined by the LDAP protocol. Note that the valueBindRequest.AUTHENTICATION_TYPE_SIMPLE(0x80) is reserved for simple authentication and the valueBindRequest.AUTHENTICATION_TYPE_SASL(0xA3) is reserved for SASL authentication.- Specified by:
getAuthenticationTypein interfaceBindRequest- Returns:
- The authentication mechanism identifier.
-
getAuthenticationValue
byte[] getAuthenticationValue()Returns the authentication information for this bind request. The content is defined by the authentication mechanism.Unless otherwise indicated, implementations will store a reference to the returned byte array, allowing applications to overwrite any sensitive data such as passwords after it has been used.
- Returns:
- The authentication information.
-
getControl
<C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException Description copied from interface:RequestDecodes and returns the first control in this request having an OID corresponding to the provided control decoder.- Specified by:
getControlin interfaceBindRequest- Specified by:
getControlin interfaceRequest- Type Parameters:
C- The type of control to be decoded and returned.- Parameters:
decoder- The control decoder.options- The set of decode options which should be used when decoding the control.- Returns:
- The decoded control, or
nullif the control is not included with this request. - Throws:
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).
-
getControls
Description copied from interface:RequestReturns aListcontaining the controls included with this request. The returnedListmay be modified if permitted by this request.- Specified by:
getControlsin interfaceBindRequest- Specified by:
getControlsin interfaceRequest- Returns:
- A
Listcontaining the controls.
-
getName
Description copied from interface:BindRequestReturns the name of the Directory object that the client wishes to bind as. The name may be empty (but nevernull) when used for anonymous binds, or when using SASL authentication. The server shall not dereference any aliases in locating the named object.The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.
- Specified by:
getNamein interfaceBindRequest- Returns:
- The name of the Directory object that the client wishes to bind as.
-
setAuthenticationType
Sets the authentication mechanism identifier for this generic bind request. Note that value0is reserved for simple authentication,1and2are reserved but unused, and3is reserved for SASL authentication.- Parameters:
type- The authentication mechanism identifier for this generic bind request.- Returns:
- This generic bind request.
- Throws:
UnsupportedOperationException- If this generic bind request does not permit the authentication type to be set.
-
setAuthenticationValue
Sets the authentication information for this generic bind request in a form defined by the authentication mechanism.Unless otherwise indicated, implementations will store a reference to the returned byte array, allowing applications to overwrite any sensitive data such as passwords after it has been used.
- Parameters:
bytes- The authentication information for this generic bind request in a form defined by the authentication mechanism.- Returns:
- This generic bind request.
- Throws:
UnsupportedOperationException- If this generic bind request does not permit the authentication bytes to be set.NullPointerException- Ifbyteswasnull.
-
setName
Sets the name of the Directory object that the client wishes to bind as. The name may be empty (but nevernullwhen used for of anonymous binds, or when using SASL authentication. The server shall not dereference any aliases in locating the named object.The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.
- Parameters:
name- The name of the Directory object that the client wishes to bind as.- Returns:
- This bind request.
- Throws:
UnsupportedOperationException- If this bind request does not permit the distinguished name to be set.NullPointerException- Ifnamewasnull.
-