Class PlainMechanism
java.lang.Object
org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanism
org.apache.qpid.protonj2.engine.sasl.client.PlainMechanism
- All Implemented Interfaces:
- Mechanism
Implements the SASL PLAIN authentication Mechanism.
 User name and Password values are sent without being encrypted.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final SymbolA singleton instance of the symbolic mechanism name.Fields inherited from class org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanismEMPTY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetInitialResponse(SaslCredentialsProvider credentials) Create an initial response based on selected mechanism.getName()booleanisApplicable(SaslCredentialsProvider credentials) Allows the Mechanism to determine if it is a valid choice based on the configured credentials at the time of selection.Methods inherited from class org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanismgetChallengeResponse, isEnabledByDefault, toString, verifyCompletion
- 
Field Details- 
PLAINA singleton instance of the symbolic mechanism name.
 
- 
- 
Constructor Details- 
PlainMechanismpublic PlainMechanism()
 
- 
- 
Method Details- 
getName- Returns:
- the well known name of this SASL mechanism.
 
- 
isApplicableDescription copied from interface:MechanismAllows the Mechanism to determine if it is a valid choice based on the configured credentials at the time of selection.- Parameters:
- credentials- the login credentials available at the time of mechanism selection.
- Returns:
- true if the mechanism can be used with the provided credentials
 
- 
getInitialResponseDescription copied from interface:MechanismCreate an initial response based on selected mechanism. May be null if there is no initial response.- Specified by:
- getInitialResponsein interface- Mechanism
- Overrides:
- getInitialResponsein class- AbstractMechanism
- Parameters:
- credentials- The credentials that are supplied for this SASL negotiation.
- Returns:
- the initial response, or null if there isn't one.
- Throws:
- SaslException- if an error occurs generating the initial response.
 
 
-