CredentialsProviderChain

Composite CredentialsProvider that delegates to a chain of providers. When asked for credentials, providers are consulted in the order given until one succeeds. If none of the providers in the chain can provide credentials then this class will throw an exception. The exception will include the providers tried in the message. Each individual exception is available as a suppressed exception.

Constructors

Link copied to clipboard
constructor(providers: List<CredentialsProvider>)
constructor(vararg providers: CredentialsProvider)

Inherited properties

Link copied to clipboard

Retrieves the simple name of the class implementing CredentialsProvider.

Functions

Link copied to clipboard
open suspend override fun resolve(attributes: <Error class: unknown class>): Credentials

Request credentials from the provider

Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
fun CredentialsProvider.cached(expireCredentialsAfter: <Error class: unknown class> = DEFAULT_CREDENTIALS_REFRESH_SECONDS.seconds, refreshBufferWindow: <Error class: unknown class> = DEFAULT_CREDENTIALS_REFRESH_BUFFER_SECONDS.seconds, clock: <Error class: unknown class> = Clock.System): CachedCredentialsProvider

A utility function which wraps a CredentialsProvider in a CachedCredentialsProvider.