Configuration for token manager.
Modulecrypto-token-0.2.0Haskell2010
Crypto.Token
Encrypted tokens/tickets to keep state in the client side.
Synopsis
- data Config
- value defaultConfig
- value interval
- value tokenLifetime
- value threadName
- data TokenManager
- value spawnTokenManager
- value killTokenManager
- value encryptToken
- value decryptToken
- Packagecrypto-token-0.2.0
- Exports10
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceToken.hs
Configuration
Default configuration to update secrets in 30 minutes (1,800 seconds) and token lifetime is 2 hours (7,200 seconds)
defaultConfigConfig {interval = 1800, tokenLifetime = 7200}
The interval to generate a new secret and remove the oldest one in seconds.
The token lifetime, that is, tokens can be decrypted in this period.
Token manager
The abstract data type for token manager.
Spawning a token manager.
Killing a token manager.
Encryption and decryption
Encrypting a target value to get a token.
Decrypting a token to get a target value.