Class PlainMechanism

  • All Implemented Interfaces:

    public class PlainMechanism
    extends AbstractMechanism
    Implements the SASL PLAIN authentication Mechanism. User name and Password values are sent without being encrypted.
    • Field Detail

      • PLAIN

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

      • PlainMechanism

        public PlainMechanism()
    • 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
      • getInitialResponse

        public ProtonBuffer getInitialResponse​(SaslCredentialsProvider credentials)
        Description copied from interface: Mechanism
        Create an initial response based on selected mechanism. May be null if there is no initial response.
        Specified by:
        getInitialResponse in interface Mechanism
        getInitialResponse in class AbstractMechanism
        credentials - The credentials that are supplied for this SASL negotiation.
        the initial response, or null if there isn't one.
        Throws: - if an error occurs generating the initial response.