DefaultNonceService

Holds valid random values in memory, protected with a Mutex, to ensure a basic form of thread-safety.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun provideNonce(): String

Implementers: Generate a new random string, store it for later verification

Link copied to clipboard
open suspend override fun verifyAndRemoveNonce(it: String): Boolean

Implementers: Verify if the value has been generated by this instance, remove it from the list of valid values

Link copied to clipboard
open suspend override fun verifyNonce(it: String): Boolean

Implementers: Verify if the string has been generated by this instance