Class SASLDigestMD5Mechanism
java.lang.Object
org.jivesoftware.smack.sasl.SASLMechanism
org.jivesoftware.smack.sasl.provided.SASLDigestMD5Mechanism
- All Implemented Interfaces:
Comparable<org.jivesoftware.smack.sasl.SASLMechanism>
public class SASLDigestMD5Mechanism
extends org.jivesoftware.smack.sasl.SASLMechanism
-
Field Summary
FieldsFields inherited from class org.jivesoftware.smack.sasl.SASLMechanism
authenticationId, authorizationId, connection, connectionConfiguration, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName, sslSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanvoidprotected byte[]evaluateChallenge(byte[] challenge) protected byte[]getName()intstatic StringquoteBackslash(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 Details
-
NAME
- See Also:
-
-
Constructor Details
-
SASLDigestMD5Mechanism
public SASLDigestMD5Mechanism()
-
-
Method Details
-
setVerifyServerResponse
public static void setVerifyServerResponse(boolean verifyServerResponse) -
authenticateInternal
- Specified by:
authenticateInternalin classorg.jivesoftware.smack.sasl.SASLMechanism
-
getAuthenticationText
protected byte[] getAuthenticationText()- Specified by:
getAuthenticationTextin classorg.jivesoftware.smack.sasl.SASLMechanism
-
getName
- Specified by:
getNamein classorg.jivesoftware.smack.sasl.SASLMechanism
-
getPriority
public int getPriority()- Specified by:
getPriorityin classorg.jivesoftware.smack.sasl.SASLMechanism
-
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
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.
-