Class PlainSaslServer

  • All Implemented Interfaces:
    javax.security.sasl.SaslServer

    @NotThreadSafe
    public final class PlainSaslServer
    extends java.lang.Object
    implements javax.security.sasl.SaslServer
    This class provides PLAIN SASL authentication.

    NOTE: When this SaslServer works on authentication (i.e., in the method evaluateResponse(byte[]), it always assigns authentication ID to authorization ID currently.

    • Method Detail

      • getMechanismName

        public java.lang.String getMechanismName()
        Specified by:
        getMechanismName in interface javax.security.sasl.SaslServer
      • evaluateResponse

        @Nullable
        public byte[] evaluateResponse​(byte[] response)
                                throws javax.security.sasl.SaslException
        Specified by:
        evaluateResponse in interface javax.security.sasl.SaslServer
        Throws:
        javax.security.sasl.SaslException
      • isComplete

        public boolean isComplete()
        Specified by:
        isComplete in interface javax.security.sasl.SaslServer
      • getAuthorizationID

        public java.lang.String getAuthorizationID()
        Specified by:
        getAuthorizationID in interface javax.security.sasl.SaslServer
      • unwrap

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

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

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

        public void dispose()
        Specified by:
        dispose in interface javax.security.sasl.SaslServer