@InterfaceStability.Unstable @InterfaceAudience.Private public abstract class RolloverSignerSecretProvider extends SignerSecretProvider
| Constructor and Description | 
|---|
| RolloverSignerSecretProvider() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | destroy()Will be called on shutdown; subclasses should perform any cleanup here. | 
| protected abstract byte[] | generateNewSecret()Subclasses should implement this to return a new secret. | 
| byte[][] | getAllSecrets()Returns all secrets that a cookie could have been signed with and are still
 valid; this should include the secret returned by getCurrentSecret(). | 
| byte[] | getCurrentSecret()Returns the current secret to be used by the Signer for signing new
 cookies. | 
| void | init(Properties config,
    javax.servlet.ServletContext servletContext,
    long tokenValidity)Initialize the SignerSecretProvider. | 
| protected void | initSecrets(byte[] currentSecret,
           byte[] previousSecret)Initializes the secrets array. | 
| protected void | rollSecret()Rolls the secret. | 
| protected void | startScheduler(long initialDelay,
              long period)Starts the scheduler for the rollover to run at an interval. | 
public void init(Properties config, javax.servlet.ServletContext servletContext, long tokenValidity) throws Exception
init in class SignerSecretProviderconfig - configuration propertiesservletContext - servlet contexttokenValidity - The amount of time a token is valid forException - thrown if an error occurredprotected void initSecrets(byte[] currentSecret,
                           byte[] previousSecret)
currentSecret - The current secretpreviousSecret - The previous secretprotected void startScheduler(long initialDelay,
                              long period)
initialDelay - The initial delay in the rollover in millisecondsperiod - The interval for the rollover in millisecondspublic void destroy()
SignerSecretProviderdestroy in class SignerSecretProviderprotected void rollSecret()
protected abstract byte[] generateNewSecret()
public byte[] getCurrentSecret()
SignerSecretProviderCallers should be careful not to modify the returned value.
getCurrentSecret in class SignerSecretProviderpublic byte[][] getAllSecrets()
SignerSecretProviderCallers should be careful not to modify the returned value.
getAllSecrets in class SignerSecretProviderCopyright © 2008–2023 Apache Software Foundation. All rights reserved.