Class EncryptedFileTokenCache

  • All Implemented Interfaces:
    com.databricks.sdk.core.oauth.TokenCache

    public class EncryptedFileTokenCache
    extends Object
    implements com.databricks.sdk.core.oauth.TokenCache
    A TokenCache implementation that stores tokens in encrypted files.
    • Constructor Detail

      • EncryptedFileTokenCache

        public EncryptedFileTokenCache​(Path cacheFilePath,
                                       String passphrase)
        Constructs a new EncryptingFileTokenCache instance.
        Parameters:
        cacheFilePath - The path where the token cache will be stored
        passphrase - The passphrase used for encryption
    • Method Detail

      • save

        public void save​(com.databricks.sdk.core.oauth.Token token)
                  throws com.databricks.sdk.core.DatabricksException
        Specified by:
        save in interface com.databricks.sdk.core.oauth.TokenCache
        Throws:
        com.databricks.sdk.core.DatabricksException
      • load

        public com.databricks.sdk.core.oauth.Token load()
        Specified by:
        load in interface com.databricks.sdk.core.oauth.TokenCache