com.sun.gssapi

Class GSSManager


public class GSSManager
extends java.lang.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
  • gss_indicate_mechs
  • gss_inquire_mechs_for_name
  • gss_inquire_name_for_mech

Method Summary

static Oid
getDefaultMech()
Determines the default mechanism.
static Oid[]
getMechs()
Indicates which mechanisms are configured within JGSS.
static Oid[]
getMechsForName(Oid nameType)
Returns all the mechanisms that support the specific name type.
static Oid[]
getNamesForMech(Oid mech)
Returns name types (Oids) supported by the selected mechanism.

Method Details

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.

getMechs

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

RFC 2078
Returns:
array of Oids indicating available mechanisms; null when no mechanism are available

getMechsForName

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

RFC 2078
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

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
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