HmacQuicTokenHandler

constructor(keyGen: () -> SecretKey = ::generateDefaultKey, tokenLifetime: Duration = TOKEN_LIFETIME_MS.milliseconds)(source)

Parameters

keyGen

a function for providing the secret key used in HMAC signing and validation. If not provided, a random 256-bit key is generated. Provide a shared key when tokens must validate across multiple server instances.

tokenLifetime

maximum age of a valid token.