com.sun.gssapi
Interface GSSCredSpi
public interface GSSCredSpi
This interface is implemented by each mechanism to provide the
functionality of a credential. Each GSSCredential uses provider
objects implementing this interface. A GSSCredential may have
several credential elements underneath it, but each GSSCredSpi
object can represent at most 1 credential element.
void | dispose() - Called to invalidate this credential element and release
any system recourses and cryptographic information owned
by the credential.
|
int | getAcceptLifetime() - Returns the accept lifetime remaining.
|
int | getInitLifetime() - Returns the init lifetime remaining.
|
int | getLifetime() - Returns the lifetime remaining.
|
Oid | getMechanism() - Returns the oid representing the underlying credential
mechanism oid.
|
GSSNameSpi | getName() - Returns the principal name for this credential.
|
int | getUsage() - Returns the credential usage.
|
void | init(GSSNameSpi desiredName, int initLifetime, int acceptLifetime, int usage) - Initialized the credential object.
|
dispose
public void dispose()
throws GSSException
Called to invalidate this credential element and release
any system recourses and cryptographic information owned
by the credential.
getAcceptLifetime
public int getAcceptLifetime()
throws GSSException
Returns the accept lifetime remaining.
- the accept lifetime remaining in seconds
getInitLifetime
public int getInitLifetime()
throws GSSException
Returns the init lifetime remaining.
- the init lifetime remaining in seconds
getLifetime
public int getLifetime()
throws GSSException
Returns the lifetime remaining. This should take
into account the credential usage, and return the
appropriate lifetime. See RFC 2078 for details.
- the lifetime remaining in seconds
getMechanism
public Oid getMechanism()
Returns the oid representing the underlying credential
mechanism oid.
- the Oid for this credential mechanism
getName
public GSSNameSpi getName()
throws GSSException
Returns the principal name for this credential. The name
is in mechanism specific format.
- GSSNameSpi representing principal name of this credential
getUsage
public int getUsage()
throws GSSException
Returns the credential usage. This must be one
GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY,
or GSSCredential.INITIATE_AND_ACCEPT.
init
public void init(GSSNameSpi desiredName,
int initLifetime,
int acceptLifetime,
int usage)
throws GSSException
Initialized the credential object. Called after the
object is first instantiated.
desiredName
- - desired name of the principalinitLifetime
- - desired lifetime for the init
credential; 0 signals use mechanism defaultacceptLifetime
- - desired lifetime for the accept
credential; 0 signals use mechanism defaultusage
- - the desired usage for this credential