Package org.jivesoftware.smack.sasl.core
Class ScramMechanism
java.lang.Object
org.jivesoftware.smack.sasl.SASLMechanism
org.jivesoftware.smack.sasl.core.ScramMechanism
- All Implemented Interfaces:
Comparable<SASLMechanism>
- Direct Known Subclasses:
ScramPlusMechanism
,SCRAMSHA1Mechanism
-
Field Summary
Fields inherited from class org.jivesoftware.smack.sasl.SASLMechanism
authenticationId, authorizationId, connection, connectionConfiguration, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName, sslSession
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
void
protected byte[]
evaluateChallenge
(byte[] challenge) Evaluate the SASL challenge.protected byte[]
Should return the initial response of the SASL mechanism.protected byte[]
Get the channel binding data.protected String
Get the SCRAM GSS-API Channel Binding Flag value.getName()
Returns the common name of the SASL mechanism.Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism
afterFinalSaslChallenge, authenticate, authenticate, authenticateInternal, challengeReceived, compareTo, getPriority, instanceForAuthentication, isAuthenticationSuccessful, isFinished, newInstance, requiresPassword, saslPrep, setException, throwExceptionIfRequired, toBytes, toString
-
Constructor Details
-
ScramMechanism
-
-
Method Details
-
authenticateInternal
- Specified by:
authenticateInternal
in classSASLMechanism
-
getAuthenticationText
Description copied from class:SASLMechanism
Should return the initial response of the SASL mechanism. The returned byte array will be send base64 encoded to the server. SASL mechanism are free to returnnull
or an empty array here.- Specified by:
getAuthenticationText
in classSASLMechanism
- Returns:
- the initial response or null
-
getName
Description copied from class:SASLMechanism
Returns the common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or GSSAPI.- Specified by:
getName
in classSASLMechanism
- Returns:
- the common name of the SASL mechanism.
-
checkIfSuccessfulOrThrow
- Specified by:
checkIfSuccessfulOrThrow
in classSASLMechanism
- Throws:
SmackException.SmackSaslException
-
authzidSupported
- Overrides:
authzidSupported
in classSASLMechanism
-
evaluateChallenge
Description copied from class:SASLMechanism
Evaluate the SASL challenge.- Overrides:
evaluateChallenge
in classSASLMechanism
- Parameters:
challenge
- challenge to evaluate.- Returns:
- null.
- Throws:
SmackException.SmackSaslException
- If a SASL related error occurs.
-
getGs2CbindFlag
Get the SCRAM GSS-API Channel Binding Flag value.- Returns:
- the gs2-cbind-flag value.
- See Also:
-
getChannelBindingData
Get the channel binding data.- Returns:
- the Channel Binding data.
- Throws:
SmackException.SmackSaslException
- if a SASL specific error occurred.
-