Class SASLDigestMD5Mechanism
- java.lang.Object
-
- org.jivesoftware.smack.sasl.SASLMechanism
-
- org.jivesoftware.smack.sasl.provided.SASLDigestMD5Mechanism
-
- All Implemented Interfaces:
java.lang.Comparable<org.jivesoftware.smack.sasl.SASLMechanism>
public class SASLDigestMD5Mechanism extends org.jivesoftware.smack.sasl.SASLMechanism
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Constructor Summary
Constructors Constructor Description SASLDigestMD5Mechanism()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidauthenticateInternal(javax.security.auth.callback.CallbackHandler cbh)booleanauthzidSupported()voidcheckIfSuccessfulOrThrow()protected byte[]evaluateChallenge(byte[] challenge)protected byte[]getAuthenticationText()java.lang.StringgetName()intgetPriority()SASLDigestMD5MechanismnewInstance()static java.lang.StringquoteBackslash(java.lang.String string)Quote the backslash in the given String.static voidsetVerifyServerResponse(boolean verifyServerResponse)-
Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism
afterFinalSaslChallenge, authenticate, authenticate, authenticateInternal, challengeReceived, compareTo, instanceForAuthentication, isAuthenticationSuccessful, isFinished, requiresPassword, saslPrep, setException, throwExceptionIfRequired, toBytes, toString
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setVerifyServerResponse
public static void setVerifyServerResponse(boolean verifyServerResponse)
-
authenticateInternal
protected void authenticateInternal(javax.security.auth.callback.CallbackHandler cbh)
- Specified by:
authenticateInternalin classorg.jivesoftware.smack.sasl.SASLMechanism
-
getAuthenticationText
protected byte[] getAuthenticationText()
- Specified by:
getAuthenticationTextin classorg.jivesoftware.smack.sasl.SASLMechanism
-
getName
public java.lang.String getName()
- Specified by:
getNamein classorg.jivesoftware.smack.sasl.SASLMechanism
-
getPriority
public int getPriority()
- Specified by:
getPriorityin classorg.jivesoftware.smack.sasl.SASLMechanism
-
newInstance
public SASLDigestMD5Mechanism newInstance()
- Specified by:
newInstancein classorg.jivesoftware.smack.sasl.SASLMechanism
-
authzidSupported
public boolean authzidSupported()
- Overrides:
authzidSupportedin classorg.jivesoftware.smack.sasl.SASLMechanism
-
checkIfSuccessfulOrThrow
public void checkIfSuccessfulOrThrow() throws org.jivesoftware.smack.SmackException.SmackSaslException- Specified by:
checkIfSuccessfulOrThrowin classorg.jivesoftware.smack.sasl.SASLMechanism- Throws:
org.jivesoftware.smack.SmackException.SmackSaslException
-
evaluateChallenge
protected byte[] evaluateChallenge(byte[] challenge) throws org.jivesoftware.smack.SmackException.SmackSaslException- Overrides:
evaluateChallengein classorg.jivesoftware.smack.sasl.SASLMechanism- Throws:
org.jivesoftware.smack.SmackException.SmackSaslException
-
quoteBackslash
public static java.lang.String quoteBackslash(java.lang.String string)
Quote the backslash in the given String. Replaces all occurrences of "\" with "\\".According to RFC 2831 ยง 7.2 a quoted-string consists either of qdtext or quoted-pair. And since quoted-pair is a backslash followed by a char, every backslash in qdtext must be quoted, since it otherwise would be treated as qdtext.
- Parameters:
string- the input string.- Returns:
- the input string where the every backslash is quoted.
-
-