Package org.wildfly.security.sasl.util
Class AbstractSaslClient
- java.lang.Object
- 
- org.wildfly.security.sasl.util.AbstractSaslParticipant
- 
- org.wildfly.security.sasl.util.AbstractSaslClient
 
 
- 
- All Implemented Interfaces:
- SaslClient,- SaslWrapper
 
 public abstract class AbstractSaslClient extends AbstractSaslParticipant implements SaslClient A base class for SASL client implementations.- Author:
- David M. Lloyd
 
- 
- 
Field Summary- 
Fields inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipantCOMPLETE_STATE, FAILED_STATE, NO_BYTES
 - 
Fields inherited from interface org.wildfly.security.sasl.util.SaslWrapperIDENTITY
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractSaslClient(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId, boolean hasInitialResponse)Deprecated.protectedAbstractSaslClient(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId, boolean hasInitialResponse, ElytronMessages log)Construct a new instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]evaluateChallenge(byte[] challenge)Evaluate an authentication challenge received from the server.protected StringgetAuthorizationId()Get the specified authorization ID.booleanhasInitialResponse()Determines whether this mechanism has an optional initial response.- 
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipantassertComplete, dispose, evaluateMessage, evaluateMessage, getCallbackHandler, getIntProperty, getMechanismName, getNegotiatedProperty, getProtocol, getServerName, getStringProperty, getWrapper, handleCallbacks, init, isComplete, negotiationComplete, setNegotiationState, setWrapper, tryHandleCallbacks, unwrap, wrap
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javax.security.sasl.SaslClientdispose, getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractSaslClientprotected AbstractSaslClient(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId, boolean hasInitialResponse, ElytronMessages log) Construct a new instance.- Parameters:
- mechanismName- the SASL mechanism name
- protocol- the protocol
- serverName- the server name
- callbackHandler- the callback handler to use for authentication
- authorizationId- the possibly- nullprotocol-dependent name used for authorization
- hasInitialResponse-- trueif the mechanism supports an initial response,- falseotherwise
- log- mechanism specific logger
 
 - 
AbstractSaslClient@Deprecated protected AbstractSaslClient(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId, boolean hasInitialResponse) Deprecated.Construct a new instance.- Parameters:
- mechanismName- the SASL mechanism name
- protocol- the protocol
- serverName- the server name
- callbackHandler- the callback handler to use for authentication
- authorizationId- the possibly- nullprotocol-dependent name used for authorization
- hasInitialResponse-- trueif the mechanism supports an initial response,- falseotherwise
 
 
- 
 - 
Method Detail- 
evaluateChallengepublic byte[] evaluateChallenge(byte[] challenge) throws SaslExceptionEvaluate an authentication challenge received from the server.- Specified by:
- evaluateChallengein interface- SaslClient
- Parameters:
- challenge- the authentication challenge
- Returns:
- the response to send to the server
- Throws:
- SaslException- if there is an error processing the server message
 
 - 
hasInitialResponsepublic boolean hasInitialResponse() Determines whether this mechanism has an optional initial response. If true, caller should callevaluateChallenge(byte[])with an empty array to get the initial response.- Specified by:
- hasInitialResponsein interface- SaslClient
- Returns:
- trueif this mechanism has an initial response
 
 - 
getAuthorizationIdprotected String getAuthorizationId() Get the specified authorization ID.- Returns:
- the authorization ID
 
 
- 
 
-