APIdia Launch Partner
Top Description Methods
sun.security.jgss.spi

public Interface GSSCredentialSpi

Known Direct Subinterfaces
sun.security.jgss.krb5.Krb5CredElement
Known Direct Implementers
sun.security.jgss.spnego.SpNegoCredElement, sun.security.jgss.wrapper.GSSCredElement
Imports
org.ietf.jgss.*, java.security.Provider

This interface is implemented by a mechanism specific credential element. A GSSCredential is conceptually a container class of several credential elements from different mechanisms.
Author
Mayank Upadhyay

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Called to invalidate this credential element and release any system recourses and cryptographic information owned by the credential.

public int

Returns:

the accept lifetime remaining in seconds
getAcceptLifetime
()

Returns the accept lifetime remaining.

public int

Returns:

the init lifetime remaining in seconds
getInitLifetime
()

Returns the init lifetime remaining.

public Oid

Returns:

the Oid for this credential mechanism
getMechanism
()

Returns the oid representing the underlying credential mechanism oid.

public GSSNameSpi

Returns:

GSSNameSpi representing principal name of this credential
getName
()

Returns the principal name for this credential.

public Provider
public GSSCredentialSpi

Returns:

the new credential
impersonate
(GSSNameSpi
the client to impersonate
name
)

Impersonates another client.

public boolean

Returns:

true if it can be used for accepting contexts
isAcceptorCredential
()

Determines if this credential element can be used by a context acceptor.

public boolean

Returns:

true if it can be used for initiating contexts
isInitiatorCredential
()

Determines if this credential element can be used by a context initiator.

Method Detail

disposeback to summary
public void dispose() throws GSSException

Called to invalidate this credential element and release any system recourses and cryptographic information owned by the credential.

Exceptions
GSSException:
with major codes NO_CRED and FAILURE
getAcceptLifetimeback to summary
public int getAcceptLifetime() throws GSSException

Returns the accept lifetime remaining.

Returns:int

the accept lifetime remaining in seconds

Exceptions
GSSException:
may be thrown
getInitLifetimeback to summary
public int getInitLifetime() throws GSSException

Returns the init lifetime remaining.

Returns:int

the init lifetime remaining in seconds

Exceptions
GSSException:
may be thrown
getMechanismback to summary
public Oid getMechanism()

Returns the oid representing the underlying credential mechanism oid.

Returns:Oid

the Oid for this credential mechanism

Exceptions
GSSException:
may be thrown
getNameback to summary
public GSSNameSpi getName() throws GSSException

Returns the principal name for this credential. The name is in mechanism specific format.

Returns:GSSNameSpi

GSSNameSpi representing principal name of this credential

Exceptions
GSSException:
may be thrown
getProviderback to summary
public Provider getProvider()
impersonateback to summary
public GSSCredentialSpi impersonate(GSSNameSpi name) throws GSSException

Impersonates another client.

Parameters
name:GSSNameSpi

the client to impersonate

Returns:GSSCredentialSpi

the new credential

Exceptions
GSSException:
may be thrown
isAcceptorCredentialback to summary
public boolean isAcceptorCredential() throws GSSException

Determines if this credential element can be used by a context acceptor.

Returns:boolean

true if it can be used for accepting contexts

isInitiatorCredentialback to summary
public boolean isInitiatorCredential() throws GSSException

Determines if this credential element can be used by a context initiator.

Returns:boolean

true if it can be used for initiating contexts