Class CramMD5Mechanism

  • All Implemented Interfaces:

    public class CramMD5Mechanism
    extends AbstractMechanism
    Implements the SASL CRAM-MD5 authentication Mechanism.
    • Field Detail

      • CRAM_MD5

        public static final Symbol CRAM_MD5
        A singleton instance of the symbolic mechanism name.
    • Constructor Detail

      • CramMD5Mechanism

        public CramMD5Mechanism()
    • Method Detail

      • getName

        public Symbol getName()
        the well known name of this SASL mechanism.
      • isApplicable

        public boolean isApplicable​(SaslCredentialsProvider credentials)
        Description copied from interface: Mechanism
        Allows the Mechanism to determine if it is a valid choice based on the configured credentials at the time of selection.
        credentials - the login credentials available at the time of mechanism selection.
        true if the mechanism can be used with the provided credentials
      • getChallengeResponse

        public ProtonBuffer getChallengeResponse​(SaslCredentialsProvider credentials,
                                                 ProtonBuffer challenge)
        Description copied from interface: Mechanism
        Create a response based on a given challenge from the remote peer.
        Specified by:
        getChallengeResponse in interface Mechanism
        getChallengeResponse in class AbstractMechanism
        credentials - The credentials that are supplied for this SASL negotiation.
        challenge - The challenge that this Mechanism should response to.
        the response that answers the given challenge.
        Throws: - if an error occurs generating the challenge response.
      • verifyCompletion

        public void verifyCompletion()
        Description copied from interface: Mechanism
        Verifies that the SASL exchange has completed successfully. This is an opportunity for the mechanism to ensure that all mandatory steps have been completed successfully and to cleanup and resources that are held by this Mechanism.
        Specified by:
        verifyCompletion in interface Mechanism
        verifyCompletion in class AbstractMechanism
        Throws: - if the outcome of the SASL exchange is not valid for this Mechanism