Class FileSignerSecretProvider

java.lang.Object
org.apache.hadoop.security.authentication.util.SignerSecretProvider
org.apache.hadoop.security.authentication.util.FileSignerSecretProvider

@Unstable @Private public class FileSignerSecretProvider extends SignerSecretProvider
A SignerSecretProvider that simply loads a secret from a specified file.
  • Constructor Details

    • FileSignerSecretProvider

      public FileSignerSecretProvider()
  • Method Details

    • init

      public void init(Properties config, javax.servlet.ServletContext servletContext, long tokenValidity) throws Exception
      Description copied from class: SignerSecretProvider
      Initialize the SignerSecretProvider
      Specified by:
      init in class SignerSecretProvider
      Parameters:
      config - configuration properties
      servletContext - servlet context
      tokenValidity - The amount of time a token is valid for
      Throws:
      Exception - thrown if an error occurred
    • getCurrentSecret

      public byte[] getCurrentSecret()
      Description copied from class: SignerSecretProvider
      Returns the current secret to be used by the Signer for signing new cookies. This should never return null.

      Callers should be careful not to modify the returned value.

      Specified by:
      getCurrentSecret in class SignerSecretProvider
      Returns:
      the current secret
    • getAllSecrets

      public byte[][] getAllSecrets()
      Description copied from class: SignerSecretProvider
      Returns all secrets that a cookie could have been signed with and are still valid; this should include the secret returned by getCurrentSecret().

      Callers should be careful not to modify the returned value.

      Specified by:
      getAllSecrets in class SignerSecretProvider
      Returns:
      the secrets