class CryptoServiceAuthenticator<T, U : AuthenticationCredentials, V : KeyConfig>
Class responsible for handling authentication of the cryptoService. Supports the ability to prompt the user for required credentials as well as resetting of the cryptoService authentication state once the desired tasks have been run.
cryptoService
- crypto service used to execute the signing/key generation tasks.
credentialsConfigs
- list of authentication credentials configuration objects for the cryptoService.
credentialsTransformer
- transformer that converts each credentials config into a fully formed credentials
object that can be used to authenticate the cryptoService.
ctx_
- logging context for authentication operations
CryptoServiceAuthenticator(cryptoService: CryptoService<U, V>, credentialsConfigs: List<T>, credentialsTransformer: CredentialsTransformer<T, U>, ctx_: <ERROR CLASS>)
Class responsible for handling authentication of the cryptoService. Supports the ability to prompt the user for required credentials as well as resetting of the cryptoService authentication state once the desired tasks have been run. |
val ctx: <ERROR CLASS> |
fun close(renderer: Renderer = LoggingRenderer(ctx)): Unit |
|
fun <T> connectAndAuthenticate(headless: Boolean = false, renderer: Renderer = LoggingRenderer(ctx), logOff: Boolean = true, userInfo: <ERROR CLASS>? = null, block: (CryptoService<U, V>) -> T): T
Interactively (using console) authenticates a user against the crypto service. Once authentication is successful the block is executed. |