validate

abstract suspend fun validate(issuerUrl: String, clientId: String, idToken: Jwt, clock: OidcClock, issuedAtGracePeriodInSeconds: Int = 600, parameters: IdTokenValidator.Parameters = Parameters(nonce = null, maxAge = null))

Validates the given idToken.

Implementations should throw Error (or another Exception) if validation fails.

Parameters

issuerUrl

the expected issuer URL.

clientId

the expected client ID (audience).

idToken

the parsed Jwt to validate.

clock

the clock for time-based checks.

issuedAtGracePeriodInSeconds

the grace period for the iat claim check (default 600 = 10 minutes).

parameters

optional nonce/maxAge parameters.