Class GSSManager

java.lang.Object
com.sun.gssapi.GSSManager

public class GSSManager extends Object
This class implements functionality common to the entire GSS-API package. This includes the management of the gss mechanisms and their providers.

RFC 2078
A side from JGSS provider management, this class implements the equivalent of the following GSS-API routines:
  • gss_indicate_mechs
  • gss_inquire_mechs_for_name
  • gss_inquire_name_for_mech
  • Constructor Details

    • GSSManager

      public GSSManager()
  • Method Details

    • getMechs

      public static Oid[] getMechs()
      Indicates which mechanisms are configured within JGSS.

      RFC 2078
      equivalent to gss_indicate_mechs
      Returns:
      array of Oids indicating available mechanisms; null when no mechanism are available
    • getNamesForMech

      public static Oid[] getNamesForMech(Oid mech) throws GSSException
      Returns name types (Oids) supported by the selected mechanism. Note that in cases where several providers implement the same mechanism, only the first provider implementing the mechanism is queried.

      RFC 2078
      equivalent to gss_inquire_names_for_mech
      Parameters:
      mech - the Oid for mechanism to be queried
      Returns:
      names array of Oids indicating names supported by the requested mechanism; or null if the mech is not supported
      Throws:
      GSSException - with major code of BAD_MECH will be thrown for invalid mechanism oids
    • getMechsForName

      public static Oid[] getMechsForName(Oid nameType)
      Returns all the mechanisms that support the specific name type.

      RFC 2078
      equivalent to gss_inquire_mechs_for_name
      Parameters:
      nameType - the Oid of the name type to be queried
      Returns:
      mechs an array of mechanism Oids supporting the requested name type; null if no mechanism supports the requested name type
    • getDefaultMech

      public static Oid getDefaultMech() throws GSSException
      Determines the default mechanism. The default mechanism is determined through the setting in the security properties file when the provider is installed or through dynamic configuration of the providers.. The default mech is the first mechanism in the first jgss provider.
      Returns:
      the Oid for the default mechanism
      Throws:
      GSSException - with major code set to BAD_MECH if no jgss providers exist.