sun.security.mule.krb5.internal.ccache
Class FileCredentialsCache

java.lang.Object
  extended by sun.security.mule.krb5.internal.ccache.CredentialsCache
      extended by sun.security.mule.krb5.internal.ccache.FileCredentialsCache
All Implemented Interfaces:
FileCCacheConstants

public class FileCredentialsCache
extends CredentialsCache
implements FileCCacheConstants

CredentialsCache stores credentials(tickets, session keys, etc) in a semi-permanent store for later use by different program.

Author:
Yanni Zhang, Ram Marti

Field Summary
 PrincipalName primaryPrincipal
           
 Realm primaryRealm
           
 Tag tag
           
 int version
           
 
Fields inherited from interface sun.security.mule.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
static FileCredentialsCache acquireInstance()
           
static FileCredentialsCache acquireInstance(PrincipalName principal, String cache)
           
static String checkValidation(String name)
           
 Credentials getCreds(LoginOptions options, PrincipalName sname, Realm srealm)
           
 Credentials getCreds(PrincipalName sname, Realm srealm)
          Gets a credentials for a specified service.
 Credentials[] getCredsList()
          Returns the list of credentials entries in the cache file.
static String getDefaultCacheName()
           
 Credentials getDefaultCreds()
           
 PrincipalName getPrimaryPrincipal()
           
 void save()
          Saves the credentials cache file to the disk.
 void update(Credentials c)
          Updates the credentials list.
 
Methods inherited from class sun.security.mule.krb5.internal.ccache.CredentialsCache
cacheName, create, create, 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

public int version

tag

public Tag tag

primaryPrincipal

public PrincipalName primaryPrincipal

primaryRealm

public Realm primaryRealm
Method Detail

acquireInstance

public static FileCredentialsCache acquireInstance(PrincipalName principal,
                                                   String cache)

acquireInstance

public static FileCredentialsCache acquireInstance()

update

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:
update in class CredentialsCache
Parameters:
c - the credentials.

getPrimaryPrincipal

public PrincipalName getPrimaryPrincipal()
Specified by:
getPrimaryPrincipal in class CredentialsCache

save

public void save()
          throws IOException,
                 Asn1Exception
Saves the credentials cache file to the disk.

Specified by:
save in class CredentialsCache
Throws:
IOException
Asn1Exception

getCredsList

public Credentials[] getCredsList()
Returns the list of credentials entries in the cache file.

Specified by:
getCredsList in class CredentialsCache

getCreds

public Credentials getCreds(LoginOptions options,
                            PrincipalName sname,
                            Realm srealm)
Specified by:
getCreds in class CredentialsCache

getCreds

public Credentials getCreds(PrincipalName sname,
                            Realm srealm)
Gets a credentials for a specified service.

Specified by:
getCreds in class CredentialsCache
Parameters:
sname - service principal name.
srealm - the realm that the service belongs to.

getDefaultCreds

public Credentials getDefaultCreds()
Specified by:
getDefaultCreds in class CredentialsCache

getDefaultCacheName

public static String getDefaultCacheName()

checkValidation

public static String checkValidation(String name)


Copyright © 2013. All Rights Reserved.