JwsProcessor

Core abstraction for JWS (signed JWT) signing and verification.

Combines the JwsSigner and JwsVerifier functional interfaces and associates them with a SigningAlgorithm and an optional key ID. Implementations are supplied to co.touchlab.kjwt.builder.JwtBuilder for signing and to co.touchlab.kjwt.parser.JwtParserBuilder for verification.

See also

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The JWS signing algorithm this processor implements.

Link copied to clipboard
abstract val keyId: String?

The optional key ID (kid) associated with the key material used by this processor.

Functions

Link copied to clipboard

Merges this BaseJwsProcessor with other, producing a combined JwsProcessor that supports both signing and verification.

Link copied to clipboard
abstract suspend fun sign(data: ByteArray): ByteArray

Signs data and returns the raw signature bytes.

Link copied to clipboard
abstract suspend fun verify(data: ByteArray, signature: ByteArray): Boolean

Verifies that signature is a valid signature over data.