JwsCompact

data class JwsCompact : JWS(source)

Implements compact serialization as defined in RFC 7515

Serialized output is of the form BASE64URL(UTF8(HEADER)).BASE64URL(PAYLOAD).BASE64URL(SIGNATURE)

This class does not support an unprotected header field!

JwsCompact is intentionally not annotated with @Serializable: its JSON representation is only the compact JWS string, not a JSON object. Use JwsCompactStringSerializer explicitly when you want that string form inside a JSON document.

For a standalone compact JWS string, use toString and JwsCompact.invoke.

If plainPayload data structure is defined as part of the contact consider JwsCompactTyped

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@Transient
val jwsHeader: JwsHeader
Link copied to clipboard
open override val plainPayload: ByteArray

Raw payload bytes.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Transient
val signatureInput: ByteArray

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
inline fun <P> getPayload(serialFormat: SerialFormat = joseCompliantSerializer): KmmResult<P>

Find correct serializer at compile time

fun <P> getPayload(serializer: KSerializer<P>, serialFormat: SerialFormat = joseCompliantSerializer): KmmResult<P>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Converts compact serialization to the equivalent flattened JSON form.

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