Class SubjectSaslServer

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

    public class SubjectSaslServer
    extends java.lang.Object
    implements javax.security.sasl.SaslServer
    A SaslServer which, when complete, can return a negotiated property named SUBJECT which contains a populated Subject representing the authenticated user.
    Since:
    10.0
    Author:
    Tristan Tarrant <tristan@infinispan.org>
    • Field Detail

      • delegate

        protected final javax.security.sasl.SaslServer delegate
      • principals

        protected final java.util.List<java.security.Principal> principals
    • Constructor Detail

      • SubjectSaslServer

        public SubjectSaslServer​(javax.security.sasl.SaslServer delegate,
                                 java.util.List<java.security.Principal> principals,
                                 AuthorizingCallbackHandler callbackHandler)
    • Method Detail

      • getMechanismName

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

        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)
                      throws javax.security.sasl.SaslException
        Specified by:
        unwrap in interface javax.security.sasl.SaslServer
        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.SaslServer
        Throws:
        javax.security.sasl.SaslException
      • getNegotiatedProperty

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

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