Configuration for token manager.
Modulecrypto-token-0.1.2Haskell2010
Crypto.Token
Encrypted tokens/tickets to keep state in the client side.
- 2 types
- 8 values
- Packagecrypto-token-0.1.2
- Exports10
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceToken.hs
Configuration
5 declarationsDefault 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
3 declarationsThe abstract data type for token manager.
Spawning a token manager.
Killing a token manager.
Encryption and decryption
2 declarationsEncrypting a target value to get a token.
Decrypting a token to get a target value.