Class GssApiAuthentication<ParameterType,​TokenType>

    • Field Detail

      • context

        private org.ietf.jgss.GSSContext context
      • token

        protected byte[] token
        The last token generated.
    • Constructor Detail

      • GssApiAuthentication

        public GssApiAuthentication​(java.net.InetSocketAddress proxy)
        Creates a new GssApiAuthentication to authenticate with the given proxy.
        Parameters:
        proxy - the InetSocketAddress of the proxy to connect to
    • Method Detail

      • close

        public void close()
      • start

        public final void start()
                         throws java.lang.Exception
        Description copied from interface: AuthenticationHandler
        Produces the initial authentication token that can be then retrieved via AuthenticationHandler.getToken().
        Throws:
        java.lang.Exception - if an error occurs
      • process

        public final void process()
                           throws java.lang.Exception
        Description copied from interface: AuthenticationHandler
        Produces the next authentication token, if any.
        Throws:
        java.lang.Exception - if an error occurs
      • checkDone

        private void checkDone()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createContext

        protected abstract org.ietf.jgss.GSSContext createContext()
                                                           throws java.lang.Exception
        Creates the GSSContext to use.
        Returns:
        a fresh GSSContext to use
        Throws:
        java.lang.Exception - if the context cannot be created
      • extractToken

        protected abstract byte[] extractToken​(ParameterType input)
                                        throws java.lang.Exception
        Extracts the token from the last set parameters.
        Parameters:
        input - to extract the token from
        Returns:
        the extracted token, or null if none
        Throws:
        java.lang.Exception - if an error occurs