NonceManager

interface NonceManager

Represents a nonce manager. Its responsibility is to produce nonce values and verify nonce values from untrusted sources that they are provided by this manager. This is usually required in web environment to mitigate CSRF attacks. Depending on it's underlying implementation it could be stateful or stateless. Note that there is usually some timeout for nonce values to reduce memory usage and to avoid replay attacks. Nonce length is unspecified.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun newNonce(): String

Generate new nonce instance

Link copied to clipboard
abstract suspend fun verifyNonce(nonce: String): Boolean

Verify nonce value