TokenValidator

class TokenValidator(secrets: List<ByteArray>, clock: Clock = SystemClock)

Validates proxy tokens received by the backend server, supporting secret rotation.

Constructors

Link copied to clipboard
constructor(secrets: List<ByteArray>, clock: Clock = SystemClock)
constructor(secret: ByteArray, clock: Clock = SystemClock)

Functions

Link copied to clipboard
fun validate(encodedToken: String, expectedServerId: String): ProxyToken

Validates encodedToken and returns parsed token claims on success.