Class ScramSHA512Mechanism
java.lang.Object
org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanism
org.apache.qpid.protonj2.engine.sasl.client.ScramSHA512Mechanism
- All Implemented Interfaces:
- Mechanism
Implements the SASL Scram SHA 256 authentication Mechanism.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final SymbolA singleton instance of the symbolic mechanism name.static final StringFields inherited from class org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanismEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an instance of theScramSHA512Mechanismwith a generated client Nonce.
- 
Method SummaryModifier and TypeMethodDescriptiongetChallengeResponse(SaslCredentialsProvider credentials, ProtonBuffer challenge) Create a response based on a given challenge from the remote peer.getInitialResponse(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.voidVerifies that the SASL exchange has completed successfully.Methods inherited from class org.apache.qpid.protonj2.engine.sasl.client.AbstractMechanismisEnabledByDefault, toString
- 
Field Details- 
SHA_512- See Also:
 
- 
HMAC_SHA_512- See Also:
 
- 
SCRAM_SHA_512A singleton instance of the symbolic mechanism name.
 
- 
- 
Constructor Details- 
ScramSHA512Mechanismpublic ScramSHA512Mechanism()Creates an instance of theScramSHA512Mechanismwith a generated client Nonce.
 
- 
- 
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.
 
- 
getChallengeResponsepublic ProtonBuffer getChallengeResponse(SaslCredentialsProvider credentials, ProtonBuffer challenge) throws SaslException Description copied from interface:MechanismCreate a response based on a given challenge from the remote peer.- Specified by:
- getChallengeResponsein interface- Mechanism
- Overrides:
- getChallengeResponsein class- AbstractMechanism
- Parameters:
- credentials- The credentials that are supplied for this SASL negotiation.
- challenge- The challenge that this Mechanism should response to.
- Returns:
- the response that answers the given challenge.
- Throws:
- SaslException- if an error occurs generating the challenge response.
 
- 
verifyCompletionDescription 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 interface- Mechanism
- Overrides:
- verifyCompletionin class- AbstractMechanism
- Throws:
- SaslException- if the outcome of the SASL exchange is not valid for this Mechanism
 
 
-