public class SASLDigestMD5Mechanism extends SASLMechanism
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
authenticationId, authorizationId, connection, connectionConfiguration, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName, sslSession
Constructor and Description |
---|
SASLDigestMD5Mechanism() |
Modifier and Type | Method and Description |
---|---|
protected void |
authenticateInternal(javax.security.auth.callback.CallbackHandler cbh) |
boolean |
authzidSupported() |
void |
checkIfSuccessfulOrThrow() |
protected byte[] |
evaluateChallenge(byte[] challenge)
Evaluate the SASL challenge.
|
protected byte[] |
getAuthenticationText()
Should return the initial response of the SASL mechanism.
|
java.lang.String |
getName()
Returns the common name of the SASL mechanism.
|
int |
getPriority()
Get the priority of this SASL mechanism.
|
SASLDigestMD5Mechanism |
newInstance() |
static java.lang.String |
quoteBackslash(java.lang.String string)
Quote the backslash in the given String.
|
static void |
setVerifyServerResponse(boolean verifyServerResponse) |
authenticate, authenticate, authenticateInternal, challengeReceived, compareTo, instanceForAuthentication, saslPrep, setSaslPrepTransformer, toBytes, toString
public static final java.lang.String NAME
public SASLDigestMD5Mechanism()
public static void setVerifyServerResponse(boolean verifyServerResponse)
protected void authenticateInternal(javax.security.auth.callback.CallbackHandler cbh) throws SmackException
authenticateInternal
in class SASLMechanism
SmackException
protected byte[] getAuthenticationText() throws SmackException
SASLMechanism
null
or an
empty array here.getAuthenticationText
in class SASLMechanism
SmackException
public java.lang.String getName()
SASLMechanism
getName
in class SASLMechanism
public int getPriority()
SASLMechanism
getPriority
in class SASLMechanism
public SASLDigestMD5Mechanism newInstance()
newInstance
in class SASLMechanism
public boolean authzidSupported()
authzidSupported
in class SASLMechanism
public void checkIfSuccessfulOrThrow() throws SmackException
checkIfSuccessfulOrThrow
in class SASLMechanism
SmackException
protected byte[] evaluateChallenge(byte[] challenge) throws SmackException
SASLMechanism
evaluateChallenge
in class SASLMechanism
challenge
- challenge to evaluate.SmackException
- in case of an error.public static java.lang.String quoteBackslash(java.lang.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.