Package com.sun.gssapi
Interface GSSCredSpi
-
public interface GSSCredSpiThis 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Called to invalidate this credential element and release any system recourses and cryptographic information owned by the credential.intgetAcceptLifetime()Returns the accept lifetime remaining.intgetInitLifetime()Returns the init lifetime remaining.intgetLifetime()Returns the lifetime remaining.OidgetMechanism()Returns the oid representing the underlying credential mechanism oid.GSSNameSpigetName()Returns the principal name for this credential.intgetUsage()Returns the credential usage.voidinit(GSSNameSpi desiredName, int initLifetime, int acceptLifetime, int usage)Initialized the credential object.
-
-
-
Method Detail
-
init
void init(GSSNameSpi desiredName, int initLifetime, int acceptLifetime, int usage) throws GSSException
Initialized the credential object. Called after the object is first instantiated.- Parameters:
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- Throws:
GSSException
-
dispose
void dispose() throws GSSExceptionCalled to invalidate this credential element and release any system recourses and cryptographic information owned by the credential.- Throws:
GSSException- with major codes NO_CRED and FAILURE
-
getName
GSSNameSpi getName() throws GSSException
Returns the principal name for this credential. The name is in mechanism specific format.- Returns:
- GSSNameSpi representing principal name of this credential
- Throws:
GSSException- may be thrown
-
getInitLifetime
int getInitLifetime() throws GSSExceptionReturns the init lifetime remaining.- Returns:
- the init lifetime remaining in seconds
- Throws:
GSSException- may be thrown
-
getAcceptLifetime
int getAcceptLifetime() throws GSSExceptionReturns the accept lifetime remaining.- Returns:
- the accept lifetime remaining in seconds
- Throws:
GSSException- may be thrown
-
getLifetime
int getLifetime() throws GSSExceptionReturns the lifetime remaining. This should take into account the credential usage, and return the appropriate lifetime. See RFC 2078 for details.- Returns:
- the lifetime remaining in seconds
- Throws:
GSSException- may be thrown
-
getUsage
int getUsage() throws GSSExceptionReturns the credential usage. This must be one GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY, or GSSCredential.INITIATE_AND_ACCEPT.- Returns:
- the credential usage
- Throws:
GSSException- may be thrown
-
getMechanism
Oid getMechanism()
Returns the oid representing the underlying credential mechanism oid.- Returns:
- the Oid for this credential mechanism
- Throws:
GSSException- may be thrown
-
-