invoke

suspend operator fun invoke(block: OathConfiguration.() -> Unit = {}): OathClient

Create an OathClient instance with a customizable configuration block. This allows for a more fluent, DSL-style configuration approach.

Return

An initialized OathClient instance.

Example with default encrypted storage:

val oathClient = OathClient {
enableCredentialCache = true
logger = CustomLogger()
}

Example with custom unencrypted storage:

val oathClient = OathClient {
storage = SQLOathStorage {
passphraseProvider = NonePassphraseProvider()
}
}

Parameters

block

The configuration block to customize the client configuration.