com.ibm.security.jgss.mech.spnego

Class SPNEGOCredential

  1. java.lang.Object
  2. extended bycom.ibm.security.jgss.mech.spnego.SPNEGOCredential
All implemented interfaces:
GSSCredentialSpi

  1. public class SPNEGOCredential
  2. extends java.lang.Object
  3. implements GSSCredentialSpi
A SPNEGO mechanism specific credential element.
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
  1. void
dispose()
Called to invalidate this credential element and release any system recourses and cryptographic information owned by the credential.
  1. int
getAcceptLifetime()
Returns the accept lifetime remaining.
  1. int
getInitLifetime()
Returns the init lifetime remaining.
  1. Oid
getMechanism()
Returns the oid representing the underlying credential mechanism oid.
  1. GSSNameSpi
getName()
Returns the principal name for this credential.
  1. java.security.Provider
getProvider()
  1. boolean
isAcceptorCredential()
Determines if this credential element can be used by a context acceptor.
  1. boolean
isInitiatorCredential()
Determines if this credential element can be used by a context initiator.
  1. java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SPNEGOCredential

  1. public SPNEGOCredential(GSSNameSpi name,
  2. int initLifetime,
  3. int acceptLifetime,
  4. int usage)
  5. 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

  1. public java.security.Provider getProvider( )
Specified by:

dispose

  1. public void dispose()
  2. 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

  1. public GSSNameSpi getName()
  2. 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

  1. public int getInitLifetime()
  2. throws GSSException
Returns the init lifetime remaining.
Specified by:
Returns:
the init lifetime remaining in seconds
Throws:
GSSException - may be thrown

getAcceptLifetime

  1. public int getAcceptLifetime()
  2. throws GSSException
Returns the accept lifetime remaining.
Specified by:
Returns:
the accept lifetime remaining in seconds
Throws:
GSSException - may be thrown

isInitiatorCredential

  1. public boolean isInitiatorCredential( )
  2. throws GSSException
Determines if this credential element can be used by a context initiator.
Specified by:
Returns:
true if it can be used for initiating contexts
Throws:

isAcceptorCredential

  1. public boolean isAcceptorCredential( )
  2. throws GSSException
Determines if this credential element can be used by a context acceptor.
Specified by:
Returns:
true if it can be used for accepting contexts
Throws:

getMechanism

  1. public Oid getMechanism()
Returns the oid representing the underlying credential mechanism oid.
Specified by:
Returns:
the Oid for this credential mechanism

toString

  1. public java.lang.String toString( )
Overrides:
toString in class java.lang.Object