com.ibm.security.jgss.mech.spnego
Class SPNEGOCredential
- java.lang.Object
com.ibm.security.jgss.mech.spnego.SPNEGOCredential
All implemented interfaces:
- public class SPNEGOCredential
- extends java.lang.Object
- implements GSSCredentialSpi
Version:
1.0
Author:
Yanni Zhang
Constructor Summary
Constructor and Description |
---|
SPNEGOCredential(GSSNameSpi name,int initLifetime,int acceptLifetime,int usage)
Constructor
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
dispose()
Called to invalidate this credential element and release
any system recourses and cryptographic information owned
by the credential.
|
|
getAcceptLifetime()
Returns the accept lifetime remaining.
|
|
getInitLifetime()
Returns the init lifetime remaining.
|
getMechanism()
Returns the oid representing the underlying credential
mechanism oid.
|
|
getName()
Returns the principal name for this credential.
|
|
|
getProvider()
|
|
isAcceptorCredential()
Determines if this credential element can be used by a context
acceptor.
|
|
isInitiatorCredential()
Determines if this credential element can be used by a context
initiator.
|
|
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail
SPNEGOCredential
- public SPNEGOCredential(GSSNameSpi name,
- int initLifetime,
- int acceptLifetime,
- int usage)
- throws GSSException
Constructor
Parameters:
name
- Name of the principal for whom this credential is to be acquired. initLifetime
- indicates the lifetime (in seconds) that is
requested for this credential to be used at the context initiator's
end. acceptLifetime
- indicates the lifetime (in seconds) that is
requested for this credential to be used at the context acceptor's
end. 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 Throws:
Method Detail
getProvider
- public java.security.Provider getProvider( )
Specified by:
getProvider
in interface GSSCredentialSpi
dispose
- public void dispose()
- throws GSSException
Called to invalidate this credential element and release
any system recourses and cryptographic information owned
by the credential.
Specified by:
dispose
in interface GSSCredentialSpi
Throws:
GSSException
- with major codes NO_CRED and FAILURE getName
- public GSSNameSpi getName()
- throws GSSException
Returns the principal name for this credential. The name
is in mechanism specific format.
Specified by:
getName
in interface GSSCredentialSpi
Returns:
GSSNameSpi representing principal name of this credential
Throws:
GSSException
- may be thrown getInitLifetime
- public int getInitLifetime()
- throws GSSException
Returns the init lifetime remaining.
Specified by:
getInitLifetime
in interface GSSCredentialSpi
getAcceptLifetime
- public int getAcceptLifetime()
- throws GSSException
Returns the accept lifetime remaining.
Specified by:
getAcceptLifetime
in interface GSSCredentialSpi
isInitiatorCredential
- public boolean isInitiatorCredential( )
- throws GSSException
Determines if this credential element can be used by a context
initiator.
Specified by:
isInitiatorCredential
in interface GSSCredentialSpi
isAcceptorCredential
- public boolean isAcceptorCredential( )
- throws GSSException
Determines if this credential element can be used by a context
acceptor.
Specified by:
isAcceptorCredential
in interface GSSCredentialSpi
getMechanism
- public Oid getMechanism()
Returns the oid representing the underlying credential
mechanism oid.
Specified by:
getMechanism
in interface GSSCredentialSpi
Returns:
the Oid for this credential mechanism
toString
- public java.lang.String toString( )
Overrides:
toString
in class java.lang.Object