Class TokenCache

java.lang.Object
org.apache.kerby.kerberos.kerb.client.jaas.TokenCache

public class TokenCache extends Object
This class provides APIs for converting token cache file with token string.
  • Constructor Details

    • TokenCache

      public TokenCache()
  • Method Details

    • readToken

      public static String readToken(String tokenCacheFile)
      Obtain token string from token cache file.
      Parameters:
      tokenCacheFile - The file stored token
      Returns:
      Token string
    • writeToken

      public static void writeToken(String token, String tokenCacheFile) throws IOException
      Write the token string to token cache file.
      Parameters:
      token - The token string
      Throws:
      IOException
    • getDefaultTokenCache

      public static File getDefaultTokenCache()
      Get the default token cache.
      Returns:
      The default token cache