Package-level declarations
Types
Functions
Link copied to clipboard
Performs basic certificate chain validation.
Link copied to clipboard
suspend fun buildCwt(type: String, key: AsymmetricKey, protectedHeaders: Map<CoseLabel, DataItem> = mapOf(), unprotectedHeaders: Map<CoseLabel, DataItem> = mapOf(), creationTime: Instant = Clock.System.now(), expiresIn: Duration? = null, body: suspend MapBuilder<*>.() -> Unit): ByteArray
suspend fun buildCwt(type: DataItem, key: AsymmetricKey, protectedHeaders: Map<CoseLabel, DataItem> = mapOf(), unprotectedHeaders: Map<CoseLabel, DataItem> = mapOf(), creationTime: Instant = Clock.System.now(), expiresIn: Duration? = null, builderAction: suspend MapBuilder<*>.() -> Unit): ByteArray
Creates a CWT message signed with the given key.
Link copied to clipboard
Link copied to clipboard
suspend fun validateCwt(cwt: ByteArray, cwtName: String, publicKey: EcPublicKey?, checks: Map<WebTokenCheck, String> = mapOf(), maxValidity: Duration = 10.hours, certificateChainValidator: suspend (chain: X509CertChain, atTime: Instant) -> Boolean? = null, clock: Clock = Clock.System): CborMap
General-purpose CWT validation using a set of built-in required checks (expiration and signature validity) and a set of optional checks specified in checks parameter.
Link copied to clipboard
suspend fun validateJwt(jwt: String, jwtName: String, publicKey: EcPublicKey? = null, checks: Map<WebTokenCheck, String> = mapOf(), maxValidity: Duration = 10.hours, certificateChainValidator: suspend (chain: X509CertChain, atTime: Instant) -> Boolean? = null, clock: Clock = Clock.System): JsonObject
General-purpose JWT validation using a set of built-in required checks (expiration and signature validity) and a set of optional checks specified in checks parameter.