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.AbstractSaslParticipant
COMPLETE_STATE, FAILED_STATE, NO_BYTES 
- 
Fields inherited from interface org.wildfly.security.sasl.util.SaslWrapper
IDENTITY 
 - 
 
- 
Constructor Summary
Constructors 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 Summary
All 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.AbstractSaslParticipant
assertComplete, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface javax.security.sasl.SaslClient
dispose, getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AbstractSaslClient
protected AbstractSaslClient(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, String authorizationId, boolean hasInitialResponse, ElytronMessages log)
Construct a new instance.- Parameters:
 mechanismName- the SASL mechanism nameprotocol- the protocolserverName- the server namecallbackHandler- the callback handler to use for authenticationauthorizationId- the possiblynullprotocol-dependent name used for authorizationhasInitialResponse-trueif the mechanism supports an initial response,falseotherwiselog- 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 nameprotocol- the protocolserverName- the server namecallbackHandler- the callback handler to use for authenticationauthorizationId- the possiblynullprotocol-dependent name used for authorizationhasInitialResponse-trueif the mechanism supports an initial response,falseotherwise
 
 - 
 
- 
Method Detail
- 
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge) throws SaslExceptionEvaluate an authentication challenge received from the server.- Specified by:
 evaluateChallengein interfaceSaslClient- Parameters:
 challenge- the authentication challenge- Returns:
 - the response to send to the server
 - Throws:
 SaslException- if there is an error processing the server message
 
- 
hasInitialResponse
public 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 interfaceSaslClient- Returns:
 trueif this mechanism has an initial response
 
- 
getAuthorizationId
protected String getAuthorizationId()
Get the specified authorization ID.- Returns:
 - the authorization ID
 
 
 - 
 
 -