Interface AnonymousSASLBindRequest
- All Superinterfaces:
BindRequest,Request,SASLBindRequest
The anonymous SASL bind request as defined in RFC 4505. This SASL mechanism
allows a client to authenticate to the server without requiring the user to
establish or otherwise disclose their identity to the server. That is, this
mechanism provides an anonymous login method. This mechanism does not provide
a security layer.
Clients should provide trace information, which has no semantic value, and can be used by administrators in order to identify the user. It should take one of two forms: an Internet email address, or an opaque string that does not contain the '@' (U+0040) character and that can be interpreted by the system administrator of the client's domain. For privacy reasons, an Internet email address or other information identifying the user should only be used with permission from the user.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the SASL mechanism that does not provide any authentication but rather uses anonymous access.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 SASL bind request as defined by the LDAP protocol, which is always0xA3.<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, which is always the empty string for SASL authentication.Returns the SASL mechanism for this SASL bind request.Returns the trace information, which has no semantic value, and can be used by administrators in order to identify the user.setTraceString(String traceString) Sets the trace information, which has no semantic value, and can be used by administrators in order to identify the user.Methods inherited from interface org.forgerock.opendj.ldap.requests.Request
containsControl
-
Field Details
-
SASL_MECHANISM_NAME
The name of the SASL mechanism that does not provide any authentication but rather uses anonymous access.- See Also:
-
-
Method Details
-
addControl
Description copied from interface:RequestAdds the provided control to this request.- Specified by:
addControlin interfaceBindRequest- Specified by:
addControlin interfaceRequest- Specified by:
addControlin interfaceSASLBindRequest- 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- Specified by:
createBindClientin interfaceSASLBindRequest- 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()Returns the authentication mechanism identifier for this SASL bind request as defined by the LDAP protocol, which is always0xA3.- Specified by:
getAuthenticationTypein interfaceBindRequest- Specified by:
getAuthenticationTypein interfaceSASLBindRequest- Returns:
- The authentication mechanism identifier.
-
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- Specified by:
getControlin interfaceSASLBindRequest- 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- Specified by:
getControlsin interfaceSASLBindRequest- Returns:
- A
Listcontaining the controls.
-
getName
Returns the name of the Directory object that the client wishes to bind as, which is always the empty string for SASL authentication.- Specified by:
getNamein interfaceBindRequest- Specified by:
getNamein interfaceSASLBindRequest- Returns:
- The name of the Directory object that the client wishes to bind as.
-
getSASLMechanism
Description copied from interface:SASLBindRequestReturns the SASL mechanism for this SASL bind request.- Specified by:
getSASLMechanismin interfaceSASLBindRequest- Returns:
- The SASL mechanism for this bind request.
-
getTraceString
Returns the trace information, which has no semantic value, and can be used by administrators in order to identify the user.- Returns:
- The trace information, which has no semantic value, and can be used by administrators in order to identify the user.
-
setTraceString
Sets the trace information, which has no semantic value, and can be used by administrators in order to identify the user.- Parameters:
traceString- The trace information, which has no semantic value, and can be used by administrators in order to identify the user.- Returns:
- This bind request.
- Throws:
UnsupportedOperationException- If this anonymous SASL request does not permit the trace information to be set.NullPointerException- IftraceStringwasnull.
-