Class ScramShaSaslClient

java.lang.Object
com.mysql.cj.sasl.ScramShaSaslClient
All Implemented Interfaces:
javax.security.sasl.SaslClient
Direct Known Subclasses:
ScramSha1SaslClient, ScramSha256SaslClient

public abstract class ScramShaSaslClient
extends java.lang.Object
implements javax.security.sasl.SaslClient
A SaslClient implementation for SCRAM-SHA mechanisms as specified in RFC 5802. Subclasses of this class must implement the hashing algorithms for the corresponding authentication mechanism.
  • Field Details

  • Constructor Details

    • ScramShaSaslClient

      public ScramShaSaslClient​(java.lang.String authorizationId, java.lang.String authenticationId, java.lang.String password) throws javax.security.sasl.SaslException
      Throws:
      javax.security.sasl.SaslException
  • Method Details

    • hasInitialResponse

      public boolean hasInitialResponse()
      Specified by:
      hasInitialResponse in interface javax.security.sasl.SaslClient
    • evaluateChallenge

      public byte[] evaluateChallenge​(byte[] challenge) throws javax.security.sasl.SaslException
      Specified by:
      evaluateChallenge in interface javax.security.sasl.SaslClient
      Throws:
      javax.security.sasl.SaslException
    • isComplete

      public boolean isComplete()
      Specified by:
      isComplete in interface javax.security.sasl.SaslClient
    • unwrap

      public byte[] unwrap​(byte[] incoming, int offset, int len) throws javax.security.sasl.SaslException
      Specified by:
      unwrap in interface javax.security.sasl.SaslClient
      Throws:
      javax.security.sasl.SaslException
    • wrap

      public byte[] wrap​(byte[] outgoing, int offset, int len) throws javax.security.sasl.SaslException
      Specified by:
      wrap in interface javax.security.sasl.SaslClient
      Throws:
      javax.security.sasl.SaslException
    • getNegotiatedProperty

      public java.lang.Object getNegotiatedProperty​(java.lang.String propName)
      Specified by:
      getNegotiatedProperty in interface javax.security.sasl.SaslClient
    • dispose

      public void dispose() throws javax.security.sasl.SaslException
      Specified by:
      dispose in interface javax.security.sasl.SaslClient
      Throws:
      javax.security.sasl.SaslException