|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ietf.jgss.GSSManager
GSSManager class is an abstract class that serves as a factory for three GSS interfaces: GSSName, GSSCredential, and GSSContext. It also provides methods for application to determine that mechanisms are available from the GSS implementation and what nametypes these mechanisms support.
An instance of the default GSSManager subclass may be obtained
through the static method getInstace()
, but
applications are free to instantiate other subclasses of
GSSManager.
Constructor Summary | |
GSSManager()
|
Method Summary | |
abstract void |
addProviderAtEnd(java.security.Provider p,
Oid mech)
This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism. |
abstract void |
addProviderAtFront(java.security.Provider p,
Oid mech)
This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism. |
abstract GSSContext |
createContext(byte[] interProcessToken)
Factory method for creating a previously exported context. |
abstract GSSContext |
createContext(GSSCredential myCred)
Factory method for creating a context on the acceptor' side. |
abstract GSSContext |
createContext(GSSName peer,
Oid mech,
GSSCredential myCred,
int lifetime)
Factory method for creating a context on the initiator's side. |
abstract GSSCredential |
createCredential(GSSName aName,
int lifetime,
Oid[] mechs,
int usage)
Factory method for acquiring credentials over a set of mechanisms. |
abstract GSSCredential |
createCredential(GSSName aName,
int lifetime,
Oid mech,
int usage)
Factory method for acquiring a single mechanism credential. |
abstract GSSCredential |
createCredential(int usage)
Factory method for acquiring default credentials. |
abstract GSSName |
createName(byte[] name,
Oid nameType)
Factory method to convert a contiguous byte array containing a name from the specified namespace to a GSSName object. |
abstract GSSName |
createName(byte[] name,
Oid nameType,
Oid mech)
Factory method to convert a contiguous byte array containing a name from the specified namespace to a GSSName object that is an MN. |
abstract GSSName |
createName(java.lang.String nameStr,
Oid nameType)
Factory method to convert a contiguous string name from the specified namespace to a GSSName object. |
abstract GSSName |
createName(java.lang.String nameStr,
Oid nameType,
Oid mech)
Factory method to convert a contiguous string name from the specified namespace to an GSSName object that is a mechanism name (MN). |
static GSSManager |
getInstance()
Returns the default GSSManager implementation |
abstract Oid[] |
getMechs()
Returns an array of Oid objects indicating mechanisms available to GSS-API callers. |
abstract Oid[] |
getMechsForName(Oid nameType)
Returns an array of Oid objects corresponding th the mechanisms that support the specific name type. |
abstract Oid[] |
getNamesForMech(Oid mech)
Returns name type Oid's supported by the specified mechanism |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GSSManager()
Method Detail |
public static GSSManager getInstance() throws java.security.NoSuchProviderException
java.security.NoSuchProviderException
public abstract Oid[] getMechs()
public abstract Oid[] getNamesForMech(Oid mech) throws GSSException
mech
- The Oid object for the mechanism to query
GSSException
public abstract Oid[] getMechsForName(Oid nameType)
nameType
- The Oid object for the name type.
public abstract GSSName createName(java.lang.String nameStr, Oid nameType) throws GSSException
nameStr
- The string representing a printable form of the name
to create.nameType
- The Oid specifying the namespace of the printable name
supplied. Note that nameType serves to describe and
qualify the interpretation of the input nameStr, it
does not necessarily imply a type for the output
GSSName implementation. "null" value can be used to
specify that a mechanism specific default printable
syntax should be assumed by each mechanism that
examines nameStr.
GSSException
public abstract GSSName createName(byte[] name, Oid nameType) throws GSSException
name
- The byte array containing the name to create.nameType
- The Oid specifying the namespace of the name supplied
in the byte array. Note that nameType serves to
describe and qualify the interpretation of the input
name byte array, it does not necessarily imply a type
for the output GSSName implementation. "null" value
can be used to specify that a mechanism specific
default syntax should be assumed by each mechanism
that examines the byte array.
GSSException
public abstract GSSName createName(java.lang.String nameStr, Oid nameType, Oid mech) throws GSSException
nameStr
- The string representing a printable form of the name
to create.nameType
- The Oid specifying the namespace of the printable name
supplied. Note that nameType serves to describe and
qualify the interpretation of the input nameStr, it
does not necessarily imply a type for the output
GSSName implementation. "null" value can be used to
specify that a mechanism specific default printable
syntax should be assumed when the mechanism examines
nameStr.mech
- Oid specifying the mechanism for which this name
should be created.
GSSException
public abstract GSSName createName(byte[] name, Oid nameType, Oid mech) throws GSSException
name
- The byte array representing the name to create.nameType
- The Oid specifying the namespace of the name supplied
in the byte array. Note that nameType serves to
describe and qualify the interpretation of the input
name byte array, it does not necessarily imply a type
for the output GSSName implementation. "null" value
can be used to specify that a mechanism specific
default syntax should be assumed by each mechanism
that examines the byte array.mech
- Oid specifying the mechanism for which this name
should be created.
GSSException
public abstract GSSCredential createCredential(int usage) throws GSSException
usage
- The intended usage for this credential object. The
value of this parameter must be one of:
GSSCredential.ACCEPT_AND_INITIATE,
GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY
GSSException
public abstract GSSCredential createCredential(GSSName aName, int lifetime, Oid mech, int usage) throws GSSException
aName
- Name of the principal for whom this credential is to
be acquired. Use "null" to specify the default
principal.lifetime
- The number of seconds that credentials should remain
valid. Use GSSCredential.INDEFINITE_LIFETIME to
request that the credentials have the maximum
permitted lifetime. Use
GSSCredential.DEFAULT_LIFETIME to request default
credential lifetime.mech
- The oid of the desired mechanism. Use "(Oid) null" to
request the default mechanism(s).usage
- The intended usage for this credential object. The
value of this parameter must be one of:
GSSCredential.ACCEPT_AND_INITIATE,
GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY
GSSException
public abstract GSSCredential createCredential(GSSName aName, int lifetime, Oid[] mechs, int usage) throws GSSException
aName
- Name of the principal for whom this credential is to
be acquired. Use "null" to specify the default
principal.lifetime
- The number of seconds that credentials should remain
valid. Use GSSCredential.INDEFINITE_LIFETIME to
request that the credentials have the maximum
permitted lifetime. Use
GSSCredential.DEFAULT_LIFETIME to request default
credential lifetime.mechs
- The array of mechanisms over which the credential is
to be acquired. Use "(Oid[]) null" for requesting a
system specific default set of mechanisms.usage
- The intended usage for this credential object. The
value of this parameter must be one of:
GSSCredential.ACCEPT_AND_INITIATE,
GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY
GSSException
public abstract GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime) throws GSSException
peer
- Name of the target peer.mech
- Oid of the desired mechanism. Use "(Oid) null" to
request default mechanism.myCred
- Credentials of the initiator. Use "null" to act as a
default initiator principal.lifetime
- The request lifetime, in seconds, for the context.
Use GSSContext.INDEFINITE_LIFETIME and
GSSContext.DEFAULT_LIFETIME to request indefinite or
default context lifetime.
GSSException
public abstract GSSContext createContext(GSSCredential myCred) throws GSSException
myCred
- Credentials for the acceptor. Use "null" to act as a
default acceptor principal.
GSSException
public abstract GSSContext createContext(byte[] interProcessToken) throws GSSException
interProcessToken
- The token previously emitted from the export method.
GSSException
public abstract void addProviderAtFront(java.security.Provider p, Oid mech) throws GSSException
Calling this method repeatedly preserves the older settings but lowers them in preference thus forming an ordered list of provider and Oid pairs that grows at the top.
Calling addProviderAtFront with a null Oid will remove all previous preferences that were set for this provider in the GSSManager instance. Calling addProviderAtFront with a non-null Oid will remove any previous preference that was set using this mechanism and this provider together.
If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.
p
- The provider instance that should be used whenever
support is needed for mech.mech
- The mechanism for which the provider is being set
GSSException
public abstract void addProviderAtEnd(java.security.Provider p, Oid mech) throws GSSException
Calling this method repeatedly preserves the older settings but raises them above newer ones in preference thus forming an ordered list of providers and Oid pairs that grows at the bottom. Thus the older provider settings will be utilized first before this one is.
If there are any previously existing preferences that conflict with the preference being set here, then the GSSManager should ignore this request.
If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.
p
- The provider instance that should be used whenever
support is needed for mech.mech
- The mechanism for which the provider is being set
GSSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |