public class SASLDigestMD5Mechanism extends SASLMechanism
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
authenticationId, connection, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName| Constructor and Description |
|---|
SASLDigestMD5Mechanism() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
authenticateInternal(CallbackHandler cbh) |
void |
checkIfSuccessfulOrThrow() |
protected byte[] |
evaluateChallenge(byte[] challenge) |
protected byte[] |
getAuthenticationText()
Should return the initial response of the SASL mechanism.
|
String |
getName()
Returns the common name of the SASL mechanism.
|
int |
getPriority() |
SASLDigestMD5Mechanism |
newInstance() |
static String |
quoteBackslash(String string)
Quote the backslash in the given String.
|
static void |
setVerifyServerResponse(boolean verifyServerResponse) |
authenticate, authenticate, authenticateInternal, challengeReceived, compareTo, instanceForAuthentication, saslPrep, setSaslPrepTransformer, toBytespublic static final String NAME
public SASLDigestMD5Mechanism()
public static void setVerifyServerResponse(boolean verifyServerResponse)
protected void authenticateInternal(CallbackHandler cbh) throws SmackException
authenticateInternal in class SASLMechanismSmackExceptionprotected byte[] getAuthenticationText() throws SmackException
SASLMechanismnull or an
empty array here.getAuthenticationText in class SASLMechanismSmackExceptionpublic String getName()
SASLMechanismgetName in class SASLMechanismpublic int getPriority()
getPriority in class SASLMechanismpublic SASLDigestMD5Mechanism newInstance()
newInstance in class SASLMechanismpublic void checkIfSuccessfulOrThrow() throws SmackException
checkIfSuccessfulOrThrow in class SASLMechanismSmackExceptionprotected byte[] evaluateChallenge(byte[] challenge) throws SmackException
evaluateChallenge in class SASLMechanismSmackExceptionpublic static String quoteBackslash(String string)
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.
string - the input string.