public abstract class AbstractSaslClient extends AbstractSaslParticipant implements javax.security.sasl.SaslClient
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
authorizationId |
private boolean |
hasInitialResponse |
NO_BYTES| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSaslClient(java.lang.String mechanismName,
java.lang.String protocol,
java.lang.String serverName,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.lang.String authorizationId,
boolean hasInitialResponse)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
evaluateChallenge(byte[] challenge)
Evaluate an authentication challenge received from the server.
|
protected java.lang.String |
getAuthorizationId()
Get the specified authorization ID.
|
boolean |
hasInitialResponse()
Determines whether this mechanism has an optional initial response.
|
dispose, evaluateMessage, getCallbackHandler, getContext, getMechanismName, getNegotiatedProperty, getProtocol, getServerName, getWrapper, handleCallbacks, init, isComplete, setWrapper, tryHandleCallbacks, unwrap, wrapprivate final java.lang.String authorizationId
private final boolean hasInitialResponse
protected AbstractSaslClient(java.lang.String mechanismName,
java.lang.String protocol,
java.lang.String serverName,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.lang.String authorizationId,
boolean hasInitialResponse)
mechanismName - the SASL mechanism nameprotocol - the protocolserverName - the server namecallbackHandler - the callback handler to use for authenticationauthorizationId - the possibly null protocol-dependent name used for authorizationhasInitialResponse - true if the mechanism supports an initial response, false otherwisepublic byte[] evaluateChallenge(byte[] challenge)
throws javax.security.sasl.SaslException
evaluateChallenge in interface javax.security.sasl.SaslClientchallenge - the authentication challengejavax.security.sasl.SaslException - if there is an error processing the server messagepublic boolean hasInitialResponse()
evaluateChallenge(byte[]) with an
empty array to get the initial response.hasInitialResponse in interface javax.security.sasl.SaslClienttrue if this mechanism has an initial responseprotected java.lang.String getAuthorizationId()