Class FileSignerSecretProvider
java.lang.Object
org.apache.hadoop.security.authentication.util.SignerSecretProvider
org.apache.hadoop.security.authentication.util.FileSignerSecretProvider
A SignerSecretProvider that simply loads a secret from a specified file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[][]Returns all secrets that a cookie could have been signed with and are still valid; this should include the secret returned by getCurrentSecret().byte[]Returns the current secret to be used by the Signer for signing new cookies.voidinit(Properties config, javax.servlet.ServletContext servletContext, long tokenValidity) Initialize the SignerSecretProviderMethods inherited from class org.apache.hadoop.security.authentication.util.SignerSecretProvider
destroy
-
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:SignerSecretProviderInitialize the SignerSecretProvider- Specified by:
initin classSignerSecretProvider- Parameters:
config- configuration propertiesservletContext- servlet contexttokenValidity- The amount of time a token is valid for- Throws:
Exception- thrown if an error occurred
-
getCurrentSecret
public byte[] getCurrentSecret()Description copied from class:SignerSecretProviderReturns 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:
getCurrentSecretin classSignerSecretProvider- Returns:
- the current secret
-
getAllSecrets
public byte[][] getAllSecrets()Description copied from class:SignerSecretProviderReturns 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:
getAllSecretsin classSignerSecretProvider- Returns:
- the secrets
-