Class GssApiMechanisms

  • public class GssApiMechanisms
    extends Object
    Global repository of GSS-API mechanisms that we can use.
    • Method Detail

      • getSupportedMechanisms

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

        public static void worked​(@NonNull
                                  Oid mechanism)
        Report that this mechanism was used successfully.
        mechanism - that worked
      • failed

        public static void failed​(@NonNull
                                  Oid mechanism)
        Mark the mechanisms as failed.
        mechanism - to mark
      • getCanonicalName

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

        public static GSSContext createContext​(@NonNull
                                               Oid mechanism,
                                               String fqdn)
        Creates a GSSContext for the given mechanism to authenticate with the host given by fqdn.
        mechanism - Oid of the mechanism to use
        fqdn - fully qualified domain name of the host to authenticate with
        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.
        context - to dispose