sun.security.mule.jgss.spnego
Class SpNegoCredElement

java.lang.Object
  extended by sun.security.mule.jgss.spnego.SpNegoCredElement
All Implemented Interfaces:
GSSCredentialSpi

public class SpNegoCredElement
extends Object
implements GSSCredentialSpi

This class is the cred element implementation for SPNEGO mech. NOTE: The current implementation can only support one mechanism. This should be changed once multi-mechanism support is needed.

Since:
1.6
Author:
Valerie Peng

Method Summary
 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.
 GSSCredentialSpi getInternalCred()
           
 Oid getMechanism()
          Returns the oid representing the underlying credential mechanism oid.
 GSSNameSpi getName()
          Returns the principal name for this credential.
 Provider getProvider()
           
 boolean isAcceptorCredential()
          Determines if this credential element can be used by a context acceptor.
 boolean isInitiatorCredential()
          Determines if this credential element can be used by a context initiator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInternalCred

public GSSCredentialSpi getInternalCred()

getProvider

public Provider getProvider()
Specified by:
getProvider in interface GSSCredentialSpi

dispose

public void dispose()
             throws GSSException
Description copied from interface: GSSCredentialSpi
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
Description copied from interface: GSSCredentialSpi
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
Description copied from interface: GSSCredentialSpi
Returns the init lifetime remaining.

Specified by:
getInitLifetime in interface GSSCredentialSpi
Returns:
the init lifetime remaining in seconds
Throws:
GSSException - may be thrown

getAcceptLifetime

public int getAcceptLifetime()
                      throws GSSException
Description copied from interface: GSSCredentialSpi
Returns the accept lifetime remaining.

Specified by:
getAcceptLifetime in interface GSSCredentialSpi
Returns:
the accept lifetime remaining in seconds
Throws:
GSSException - may be thrown

isInitiatorCredential

public boolean isInitiatorCredential()
                              throws GSSException
Description copied from interface: GSSCredentialSpi
Determines if this credential element can be used by a context initiator.

Specified by:
isInitiatorCredential in interface GSSCredentialSpi
Returns:
true if it can be used for initiating contexts
Throws:
GSSException

isAcceptorCredential

public boolean isAcceptorCredential()
                             throws GSSException
Description copied from interface: GSSCredentialSpi
Determines if this credential element can be used by a context acceptor.

Specified by:
isAcceptorCredential in interface GSSCredentialSpi
Returns:
true if it can be used for accepting contexts
Throws:
GSSException

getMechanism

public Oid getMechanism()
Description copied from interface: GSSCredentialSpi
Returns the oid representing the underlying credential mechanism oid.

Specified by:
getMechanism in interface GSSCredentialSpi
Returns:
the Oid for this credential mechanism


Copyright © 2013. All Rights Reserved.