Top Description Fields Constructors Methods
sun.security.krb5.internal.ccache

public Class FileCredentialsCache

extends CredentialsCache
implements FileCCacheConstants
Class Inheritance
All Implemented Interfaces
sun.security.krb5.internal.ccache.FileCCacheConstants
Imports
jdk.internal.util.OperatingSystem, sun.security.action.GetPropertyAction, sun.security.krb5.*, sun.security.krb5.internal.*, sun.security.util.SecurityProperties, java.nio.charset.StandardCharsets, java.security.PrivilegedAction, java.util.ArrayList, .Collections, .List, .StringTokenizer, .Vector, java.io.IOException, .File, .FileInputStream, .FileOutputStream, .BufferedReader, .InputStreamReader

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

Field Summary

Modifier and TypeField and Description
private final List<CredentialsCache.ConfigEntry>
private Vector<Credentials>
private static final boolean
public PrincipalName
public Tag
public int
Inherited from sun.security.krb5.internal.ccache.CredentialsCache:
cacheName

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static synchronized FileCredentialsCache
public static FileCredentialsCache
public void
public static String
private static String
pack-priv boolean
exists(String cache)

public List<CredentialsCache.ConfigEntry>
public Credentials
public Credentials
getCreds(PrincipalName
service principal name.
sname
)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getCreds.

Gets a credentials for a specified service.
public synchronized Credentials[]
getCredsList()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getCredsList.

Returns the list of credentials entries in the cache file.
public static String
public Credentials
public Credentials
public synchronized PrincipalName
pack-priv synchronized void
init(PrincipalName principal, String name)

pack-priv synchronized void
load(String name)

pack-priv boolean
match(String[] s1, String[] s2)

pack-priv static synchronized FileCredentialsCache
New(PrincipalName principal, String name)

pack-priv static synchronized FileCredentialsCache
New(PrincipalName principal)

public synchronized void
save()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.save.

Saves the credentials cache file to the disk.
public synchronized void
update(Credentials
the credentials.
c
)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.update.

Updates the credentials list.
Inherited from sun.security.krb5.internal.ccache.CredentialsCache:
cacheNamecreatecreategetConfigEntrygetInstancegetInstancegetInstancegetInstance

Field Detail

configEntriesback to summary
private final List<CredentialsCache.ConfigEntry> configEntries
credentialsListback to summary
private Vector<Credentials> credentialsList
DEBUGback to summary
private static final boolean DEBUG
primaryPrincipalback to summary
public PrincipalName primaryPrincipal
tagback to summary
public Tag tag
versionback to summary
public int version

Constructor Detail

FileCredentialsCacheback to summary
private FileCredentialsCache()

Method Detail

acquireInstanceback to summary
public static synchronized FileCredentialsCache acquireInstance(PrincipalName principal, String cache)
acquireInstanceback to summary
public static FileCredentialsCache acquireInstance()
addConfigEntryback to summary
public void addConfigEntry(CredentialsCache.ConfigEntry e)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.addConfigEntry.

Annotations
@Override
checkValidationback to summary
public static String checkValidation(String name)
execback to summary
private static String exec(String c)
existsback to summary
pack-priv boolean exists(String cache)
getConfigEntriesback to summary
public List<CredentialsCache.ConfigEntry> getConfigEntries()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getConfigEntries.

Annotations
@Override
getCredsback to summary
public Credentials getCreds(LoginOptions options, PrincipalName sname)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getCreds.

getCredsback to summary
public Credentials getCreds(PrincipalName sname)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getCreds.

Gets a credentials for a specified service.

Parameters
sname:PrincipalName

service principal name.

getCredsListback to summary
public synchronized Credentials[] getCredsList()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getCredsList.

Returns the list of credentials entries in the cache file.

getDefaultCacheNameback to summary
public static String getDefaultCacheName()
getDefaultCredsback to summary
public Credentials getDefaultCreds()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getDefaultCreds.

getInitialCredsback to summary
public Credentials getInitialCreds()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getInitialCreds.

getPrimaryPrincipalback to summary
public synchronized PrincipalName getPrimaryPrincipal()

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.getPrimaryPrincipal.

initback to summary
pack-priv synchronized void init(PrincipalName principal, String name) throws IOException, KrbException
loadback to summary
pack-priv synchronized void load(String name) throws IOException, KrbException
matchback to summary
pack-priv boolean match(String[] s1, String[] s2)
Newback to summary
pack-priv static synchronized FileCredentialsCache New(PrincipalName principal, String name)
Newback to summary
pack-priv static synchronized FileCredentialsCache New(PrincipalName principal)
saveback to summary
public synchronized void save() throws IOException, Asn1Exception

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.save.

Saves the credentials cache file to the disk.

updateback to summary
public synchronized void update(Credentials c)

Implements abstract sun.security.krb5.internal.ccache.CredentialsCache.update.

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.

Parameters
c:Credentials

the credentials.