Class GssApiAuthentication<P,T>

java.lang.Object
org.apache.sshd.client.session.proxy.AbstractAuthenticationHandler<P,T>
org.apache.sshd.client.session.proxy.GssApiAuthentication<P,T>
Type Parameters:
P - defining the parameter type for the authentication
T - defining the token type for the authentication
All Implemented Interfaces:
Closeable, AutoCloseable, AuthenticationHandler<P,T>

public abstract class GssApiAuthentication<P,T> extends AbstractAuthenticationHandler<P,T>
An abstract implementation of a GSS-API multi-round authentication.
  • Field Details

    • token

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

  • Method Details

    • close

      public void close()
    • start

      public final void start() throws IOException
      Description copied from interface: AuthenticationHandler
      Produces the initial authentication token that can be then retrieved via AuthenticationHandler.getToken().
      Throws:
      IOException
    • process

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

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

      protected abstract byte[] extractToken(P input) throws 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:
      Exception - if an error occurs