NonceService

interface NonceService(source)

Provides generation, storage and validation of challenges used throughout the code, e.g. as challenges for presentation of credentials. Can be implemented to provide replication across different instances of the enclosing application.

Inheritors

Functions

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

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

Link copied to clipboard
abstract suspend 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
abstract suspend fun verifyNonce(it: String): Boolean

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