public class ClientFactory extends java.lang.Object implements SaslClientFactory
SaslClient
,
Sasl
Constructor and Description |
---|
ClientFactory() |
Modifier and Type | Method and Description |
---|---|
SaslClient |
createSaslClient(java.lang.String[] mechanisms,
java.lang.String authorizationId,
java.lang.String protocol,
java.lang.String serverName,
java.util.Hashtable<java.lang.Object,java.lang.Object> props,
javax.security.auth.callback.CallbackHandler cbh)
Creates a SaslClient using the parameters supplied.
|
java.lang.String[] |
getMechanismNames()
Returns an array of names of mechanisms supported by this
factory.
|
public SaslClient createSaslClient(java.lang.String[] mechanisms, java.lang.String authorizationId, java.lang.String protocol, java.lang.String serverName, java.util.Hashtable<java.lang.Object,java.lang.Object> props, javax.security.auth.callback.CallbackHandler cbh) throws SaslException
createSaslClient
in interface SaslClientFactory
mechanisms
- The non-null list of mechanism names to try.
Each is the IANA-registered name of a SASL mechanism. (e.g.
"GSSAPI", "CRAM-MD5").authorizationId
- The possibly null authorization ID to
use. When the SASL authentication completes successfully, the
entity named by authorizationId is granted access.protocol
- The non-null string name of the protocol for
which the authentication is being performed (e.g., "ldap").serverName
- The non-null string name of the server to
which we are creating an authenticated connection.props
- The possibly null properties to be used by the SASL
mechanisms to configure the authentication exchange. For example,
"javax.security.sasl.encryption.maximum" might be used to
specify the maximum key length to use for encryption.cbh
- The possibly null callback handler to used by the
SASL mechanisms to get further information from the
application/library to complete the authentication. For example,
a SASL mechanism might require the authentication ID and
password from the caller.SaslException
- if it cannot create a
SaslClient because of an error.public java.lang.String[] getMechanismNames()
getMechanismNames
in interface SaslClientFactory