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.String
NAME
-
Constructor Summary
Constructors Constructor Description SASLDigestMD5Mechanism()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
authenticateInternal(javax.security.auth.callback.CallbackHandler cbh)
boolean
authzidSupported()
void
checkIfSuccessfulOrThrow()
protected byte[]
evaluateChallenge(byte[] challenge)
protected byte[]
getAuthenticationText()
java.lang.String
getName()
int
getPriority()
SASLDigestMD5Mechanism
newInstance()
static java.lang.String
quoteBackslash(java.lang.String string)
Quote the backslash in the given String.static void
setVerifyServerResponse(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:
authenticateInternal
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
getAuthenticationText
protected byte[] getAuthenticationText()
- Specified by:
getAuthenticationText
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
getName
public java.lang.String getName()
- Specified by:
getName
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
getPriority
public int getPriority()
- Specified by:
getPriority
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
newInstance
public SASLDigestMD5Mechanism newInstance()
- Specified by:
newInstance
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
authzidSupported
public boolean authzidSupported()
- Overrides:
authzidSupported
in classorg.jivesoftware.smack.sasl.SASLMechanism
-
checkIfSuccessfulOrThrow
public void checkIfSuccessfulOrThrow() throws org.jivesoftware.smack.SmackException.SmackSaslException
- Specified by:
checkIfSuccessfulOrThrow
in classorg.jivesoftware.smack.sasl.SASLMechanism
- Throws:
org.jivesoftware.smack.SmackException.SmackSaslException
-
evaluateChallenge
protected byte[] evaluateChallenge(byte[] challenge) throws org.jivesoftware.smack.SmackException.SmackSaslException
- Overrides:
evaluateChallenge
in 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.
-
-