Package-level declarations

Types

Link copied to clipboard
fun interface CredentialsProvider<T> : Function0<T?>
Link copied to clipboard
data class ExpiringCredentials<T>(val credentials: T, val expiry: Instant)
Link copied to clipboard
object HmacSha256
Link copied to clipboard
Link copied to clipboard
object Sha256

Functions

Link copied to clipboard
fun <T> CredentialsProvider.Companion.Refreshing(gracePeriod: Duration = Duration.ofSeconds(10), clock: Clock = Clock.systemUTC(), refreshFn: RefreshCredentials<T>): CredentialsProvider<T>
fun <T> CredentialsProvider.Companion.Refreshing(gracePeriod: Duration = Duration.ofSeconds(10), timeSource: () -> Instant, refreshFn: RefreshCredentials<T>): CredentialsProvider<T>
Link copied to clipboard
fun secureEquals(first: String?, second: String?): Boolean

Constant-time string comparison for secrets/tokens. Avoids leaking how many leading bytes matched via timing. Null inputs never match (including null vs null) to prevent fail-open behaviour when a secret is absent. Both sides are hashed before comparison so input length is not observable.