public class ScramShaSaslClientFactory
extends java.lang.Object
implements javax.security.sasl.SaslClientFactory
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
SUPPORTED_MECHANISMS |
| Constructor and Description |
|---|
ScramShaSaslClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
javax.security.sasl.SaslClient |
createSaslClient(java.lang.String[] mechanisms,
java.lang.String authorizationId,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,?> props,
javax.security.auth.callback.CallbackHandler cbh) |
java.lang.String[] |
getMechanismNames(java.util.Map<java.lang.String,?> props) |
private java.lang.String |
getPassword(java.lang.String prefix,
javax.security.auth.callback.CallbackHandler cbh)
Gets the password, which is provided by a
CallbackHandler to be implemented by the requester of this service. |
private java.lang.String |
getUsername(java.lang.String prefix,
java.lang.String authorizationId,
javax.security.auth.callback.CallbackHandler cbh)
Gets the authentication id, which is provided by a
CallbackHandler to be implemented by the requester of this service. |
public javax.security.sasl.SaslClient createSaslClient(java.lang.String[] mechanisms,
java.lang.String authorizationId,
java.lang.String protocol,
java.lang.String serverName,
java.util.Map<java.lang.String,?> props,
javax.security.auth.callback.CallbackHandler cbh)
throws javax.security.sasl.SaslException
createSaslClient in interface javax.security.sasl.SaslClientFactoryjavax.security.sasl.SaslExceptionpublic java.lang.String[] getMechanismNames(java.util.Map<java.lang.String,?> props)
getMechanismNames in interface javax.security.sasl.SaslClientFactoryprivate java.lang.String getUsername(java.lang.String prefix,
java.lang.String authorizationId,
javax.security.auth.callback.CallbackHandler cbh)
throws javax.security.sasl.SaslException
CallbackHandler to be implemented by the requester of this service.prefix - the prefix to use in the prompt.authorizationId - the authorization id that can be used as default authentication id if none is provided.cbh - the callback handler to use.javax.security.sasl.SaslException - if the callback handler is null or not supported by the callback handler implementer.private java.lang.String getPassword(java.lang.String prefix,
javax.security.auth.callback.CallbackHandler cbh)
throws javax.security.sasl.SaslException
CallbackHandler to be implemented by the requester of this service.prefix - the prefix to use in the prompt.cbh - the callback handler to use.javax.security.sasl.SaslException - if the callback handler is null or not supported by the callback handler implementer.