Package org.apache.qpid.jms.sasl
Class AbstractMechanism
java.lang.Object
org.apache.qpid.jms.sasl.AbstractMechanism
- All Implemented Interfaces:
Comparable<Mechanism>,Mechanism
- Direct Known Subclasses:
AnonymousMechanism,CramMD5Mechanism,ExternalMechanism,GssapiMechanism,PlainMechanism,ScramSHA1Mechanism,ScramSHA256Mechanism,ScramSHA512Mechanism,XOauth2Mechanism
Base class for SASL Authentication Mechanism that implements the basic
methods of a Mechanism class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.qpid.jms.sasl.Mechanism
Mechanism.PRIORITY -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the configured password value for this Mechanism.Returns the configured user name value for this Mechanism.voidPerform any configuration initiation required by the mechanism.booleanAllows the mechanism to indicate if it is enabled by default, or only when explicitly enabled through configuring the permitted sasl mechanisms.voidsetPassword(String value) Sets the password value for this Mechanism.voidsetUsername(String value) Sets the user name value for this Mechanism.toString()voidVerifies that the SASL exchange has completed successfully.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.qpid.jms.sasl.Mechanism
getAdditionalFailureInformation, getChallengeResponse, getInitialResponse, getName, getPriority, isApplicable
-
Field Details
-
EMPTY
protected static final byte[] EMPTY
-
-
Constructor Details
-
AbstractMechanism
public AbstractMechanism()
-
-
Method Details
-
init
Description copied from interface:MechanismPerform any configuration initiation required by the mechanism. -
verifyCompletion
Description copied from interface:MechanismVerifies 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:
verifyCompletionin interfaceMechanism- Throws:
SaslException- if the outcome of the SASL exchange is not valid for this Mechanism
-
compareTo
- Specified by:
compareToin interfaceComparable<Mechanism>
-
setUsername
Description copied from interface:MechanismSets the user name value for this Mechanism. The Mechanism can ignore this value if it does not utilize user name in it's authentication processing.- Specified by:
setUsernamein interfaceMechanism- Parameters:
value- The user name given.
-
getUsername
Description copied from interface:MechanismReturns the configured user name value for this Mechanism.- Specified by:
getUsernamein interfaceMechanism- Returns:
- the currently set user name value for this Mechanism.
-
setPassword
Description copied from interface:MechanismSets the password value for this Mechanism. The Mechanism can ignore this value if it does not utilize a password in it's authentication processing.- Specified by:
setPasswordin interfaceMechanism- Parameters:
value- The user name given.
-
getPassword
Description copied from interface:MechanismReturns the configured password value for this Mechanism.- Specified by:
getPasswordin interfaceMechanism- Returns:
- the currently set password value for this Mechanism.
-
toString
-
isEnabledByDefault
public boolean isEnabledByDefault()Description copied from interface:MechanismAllows the mechanism to indicate if it is enabled by default, or only when explicitly enabled through configuring the permitted sasl mechanisms.- Specified by:
isEnabledByDefaultin interfaceMechanism- Returns:
- true if this Mechanism is enabled by default.
-