claim

Sets a raw claim using a pre-built JsonElement.

Return

this builder for chaining

Parameters

name

the claim name

value

the claim value as a JsonElement


fun <T> claim(name: String, serializer: SerializationStrategy<T>, value: T?): JwtBuilder(source)

Sets a typed claim using an explicit SerializationStrategy.

Return

this builder for chaining

Parameters

name

the claim name

serializer

the serialization strategy for T

value

the claim value, or null to remove the claim


inline fun <T> claim(name: String, value: T): JwtBuilder(source)

Sets a typed claim, inferring the serializer from the reified type T.

Return

this builder for chaining

Parameters

name

the claim name

value

the claim value