CompressedStatusList

class CompressedStatusList(val bitsPerItem: Int, compressedStatusList: ByteArray, val creationTime: Instant = Clock.System.now())

Status list as defined in OAuth Status List in the compressed form.

Use this (compressed) form of the list to serve status list requests in JWT (and CBOR in the future) format.

Parameters

bitsPerItem

number of bits per status code, must be 1, 2, 4, or 8

compressedStatusList

status values packed as an array and compressed as defined by the spec above

creationTime

time of the status list creation, useful to determine freshness when the status list is served through HTTP in one of its serialized forms.

Constructors

Link copied to clipboard
constructor(bitsPerItem: Int, compressedStatusList: ByteArray, creationTime: Instant = Clock.System.now())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun decompress(): StatusList

Creates decompressed form of this status list.

Link copied to clipboard
suspend fun serializeAsCwt(key: AsymmetricKey, subject: String, expiresIn: Duration = 20.minutes + Random.Default.nextInt(1000).seconds): ByteArray

Creates JWT serialization of the status list.

Link copied to clipboard
suspend fun serializeAsJwt(key: AsymmetricKey, subject: String, expiresIn: Duration = 20.minutes + Random.Default.nextInt(1000).seconds): String

Creates JWT serialization of the status list.