Class SASLJavaXMechanism
- java.lang.Object
-
- org.jivesoftware.smack.sasl.SASLMechanism
-
- org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism
-
- All Implemented Interfaces:
Comparable<SASLMechanism>
- Direct Known Subclasses:
SASLCramMD5Mechanism,SASLDigestMD5Mechanism,SASLExternalMechanism,SASLGSSAPIMechanism,SASLPlainMechanism
public abstract class SASLJavaXMechanism extends SASLMechanism
-
-
Field Summary
Fields Modifier and Type Field Description protected SaslClientsc-
Fields inherited from class org.jivesoftware.smack.sasl.SASLMechanism
authenticationId, authorizationId, connection, connectionConfiguration, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName, sslSession
-
-
Constructor Summary
Constructors Constructor Description SASLJavaXMechanism()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidauthenticateInternal()protected voidauthenticateInternal(CallbackHandler cbh)voidcheckIfSuccessfulOrThrow()protected byte[]evaluateChallenge(byte[] challenge)Evaluate the SASL challenge.protected byte[]getAuthenticationText()Should return the initial response of the SASL mechanism.abstract StringgetName()Returns the common name of the SASL mechanism.protected Map<String,String>getSaslProps()protected StringgetServerName()-
Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism
afterFinalSaslChallenge, authenticate, authenticate, authzidSupported, challengeReceived, compareTo, getPriority, instanceForAuthentication, isAuthenticationSuccessful, isFinished, newInstance, requiresPassword, saslPrep, setException, throwExceptionIfRequired, toBytes, toString
-
-
-
-
Field Detail
-
sc
protected SaslClient sc
-
-
Constructor Detail
-
SASLJavaXMechanism
public SASLJavaXMechanism()
-
-
Method Detail
-
getName
public abstract String getName()
Description copied from class:SASLMechanismReturns the common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or GSSAPI.- Specified by:
getNamein classSASLMechanism- Returns:
- the common name of the SASL mechanism.
-
checkIfSuccessfulOrThrow
public final void checkIfSuccessfulOrThrow() throws SmackException.SmackSaslException
- Specified by:
checkIfSuccessfulOrThrowin classSASLMechanism- Throws:
SmackException.SmackSaslException
-
authenticateInternal
protected void authenticateInternal() throws SmackJavaxSaslException
- Overrides:
authenticateInternalin classSASLMechanism- Throws:
SmackJavaxSaslException
-
authenticateInternal
protected void authenticateInternal(CallbackHandler cbh) throws SmackJavaxSaslException
- Specified by:
authenticateInternalin classSASLMechanism- Throws:
SmackJavaxSaslException
-
getAuthenticationText
protected byte[] getAuthenticationText() throws SmackJavaxSaslException
Description copied from class:SASLMechanismShould return the initial response of the SASL mechanism. The returned byte array will be send base64 encoded to the server. SASL mechanism are free to returnnullor an empty array here.- Specified by:
getAuthenticationTextin classSASLMechanism- Returns:
- the initial response or null
- Throws:
SmackJavaxSaslException
-
evaluateChallenge
protected byte[] evaluateChallenge(byte[] challenge) throws SmackJavaxSaslException
Description copied from class:SASLMechanismEvaluate the SASL challenge.- Overrides:
evaluateChallengein classSASLMechanism- Parameters:
challenge- challenge to evaluate.- Returns:
- null.
- Throws:
SmackJavaxSaslException
-
getSaslProps
protected Map<String,String> getSaslProps()
-
getServerName
protected String getServerName()
-
-