com.ibm.security.krb5.internal.ccache

Class FileCredentialsCache

  1. java.lang.Object
  2. extended bycom.ibm.security.krb5.internal.ccache.CredentialsCache
  3. extended bycom.ibm.security.krb5.internal.ccache.FileCredentialsCache
All implemented interfaces:
FileCCacheConstants

  1. public class FileCredentialsCache
  2. extends CredentialsCache
  3. implements FileCCacheConstants
CredentialsCache stores credentials(tickets, session keys, etc) in a semi-permanent store for later use by different program.
Version:
1.00
Author:
Yanni Zhang

Field Summary

Modifier and Type Field and Description
  1. PrincipalName
primaryPrincipal
DOCUMENT ME!
  1. Realm
primaryRealm
DOCUMENT ME!
  1. Tag
tag
DOCUMENT ME!
  1. int
version
DOCUMENT ME!
Fields inherited from interface com.ibm.security.krb5.internal.ccache.FileCCacheConstants
FCC_TAG_DELTATIME, KRB5_FCC_FVNO_1, KRB5_FCC_FVNO_2, KRB5_FCC_FVNO_3, KRB5_FCC_FVNO_4, KRB5_NT_UNKNOWN, MAXNAMELENGTH, TKT_FLG_FORWARDABLE, TKT_FLG_FORWARDED, TKT_FLG_HW_AUTH, TKT_FLG_INITIAL, TKT_FLG_INVALID, TKT_FLG_MAY_POSTDATE, TKT_FLG_POSTDATED, TKT_FLG_PRE_AUTH, TKT_FLG_PROXIABLE, TKT_FLG_PROXY, TKT_FLG_RENEWABLE

Method Summary

Modifier and Type Method and Description
  1. static
  2. FileCredentialsCache
acquireInstance()
DOCUMENT ME!
  1. static
  2. FileCredentialsCache
acquireInstance(PrincipalName principal,java.lang.String cache)
DOCUMENT ME!
  1. void
destroy()
Deletes the credentials cache file.
  1. Credentials
getCreds(LoginOptions options,PrincipalName sname,Realm srealm)
DOCUMENT ME!
  1. Credentials
getCreds(PrincipalName sname,Realm srealm)
Gets a credentials for a specified service.
  1. Credentials[]
getCredsList()
Returns the list of credentials entries in the cache file.
  1. static
  2. java.lang.String
getDefaultCacheName()
  1. Credentials
getDefaultCreds()
DOCUMENT ME!
  1. PrincipalName
getPrimaryPrincipal()
DOCUMENT ME!
  1. void
save()
Saves the credentials cache file to the disk.
  1. void
update(Credentials c)
Updates the credentials list.
Methods inherited from class com.ibm.security.krb5.internal.ccache.CredentialsCache
cacheName, create, create, getInstance, getInstance, getInstance, getInstance, getInstance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

version

  1. public int version
DOCUMENT ME!

tag

  1. public Tag tag
DOCUMENT ME!

primaryPrincipal

  1. public PrincipalName primaryPrincipal
DOCUMENT ME!

primaryRealm

  1. public Realm primaryRealm
DOCUMENT ME!

Method Detail

acquireInstance

  1. public static FileCredentialsCache acquireInstance( PrincipalName principal,
  2. java.lang.String cache)
DOCUMENT ME!
Parameters:
principal - DOCUMENT ME!
cache - DOCUMENT ME!
Returns:
DOCUMENT ME!

acquireInstance

  1. public static FileCredentialsCache acquireInstance( )
DOCUMENT ME!
Returns:
DOCUMENT ME!

update

  1. public void update(Credentials c)
Updates the credentials list. If the specified credentials for the service is new, add it to the list. If there is an entry in the list, replace the old credentials with the new one.
Specified by:
Parameters:
c - the credentials.

getPrimaryPrincipal

  1. public PrincipalName getPrimaryPrincipal( )
DOCUMENT ME!
Specified by:
Returns:
DOCUMENT ME!

save

  1. public void save()
  2. throws java.io.IOException
  3. Asn1Exception
Saves the credentials cache file to the disk.
Specified by:
Throws:
java.io.IOException - DOCUMENT ME!

getCredsList

  1. public Credentials[] getCredsList( )
Returns the list of credentials entries in the cache file.
Specified by:
Returns:
DOCUMENT ME!

getCreds

  1. public Credentials getCreds(LoginOptions options,
  2. PrincipalName sname,
  3. Realm srealm)
DOCUMENT ME!
Specified by:
Parameters:
options - DOCUMENT ME!
sname - DOCUMENT ME!
srealm - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCreds

  1. public Credentials getCreds(PrincipalName sname,
  2. Realm srealm)
Gets a credentials for a specified service.
Specified by:
Parameters:
sname - service principal name.
srealm - the realm that the service belongs to.
Returns:
DOCUMENT ME!

getDefaultCreds

  1. public Credentials getDefaultCreds( )
DOCUMENT ME!
Specified by:
Returns:
DOCUMENT ME!

destroy

  1. public void destroy()
Deletes the credentials cache file. Currently it only can delete files on Windows platform.
Specified by:

getDefaultCacheName

  1. public static java.lang.String getDefaultCacheName( )