Class GssApiMechanisms

java.lang.Object
org.apache.sshd.client.session.proxy.GssApiMechanisms

public final class GssApiMechanisms extends Object
Global repository of GSS-API mechanisms that we can use.
  • Field Details

  • Method Details

    • getSupportedMechanisms

      public static Collection<Oid> getSupportedMechanisms()
      Retrieves an immutable collection of the supported mechanisms.
      Returns:
      the supported mechanisms
    • worked

      public static void worked(Oid mechanism)
      Report that this mechanism was used successfully.
      Parameters:
      mechanism - that worked
    • failed

      public static void failed(Oid mechanism)
      Mark the mechanisms as failed.
      Parameters:
      mechanism - to mark
    • resolve

      public static InetAddress resolve(InetSocketAddress remote)
      Resolves an InetSocketAddress.
      Parameters:
      remote - to resolve
      Returns:
      the resolved InetAddress, or null if unresolved.
    • getCanonicalName

      public static String getCanonicalName(InetSocketAddress remote)
      Determines a canonical host name for use use with GSS-API.
      Parameters:
      remote - to get the host name from
      Returns:
      the canonical host name, if it can be determined, otherwise the unprocessed host name.
    • createContext

      public static GSSContext createContext(Oid mechanism, String fqdn)
      Creates a GSSContext for the given mechanism to authenticate with the host given by fqdn.
      Parameters:
      mechanism - Oid of the mechanism to use
      fqdn - fully qualified domain name of the host to authenticate with
      Returns:
      the context, if the mechanism is available and the context could be created, or null otherwise
    • closeContextSilently

      public static void closeContextSilently(GSSContext context)
      Closes (disposes of) a GSSContext ignoring any GSSExceptions.
      Parameters:
      context - to dispose