Skip to content

JwtOptions

JwtOptions configures the JWT extension.

readonly optional adapter?: TypeAdapter

adapter converts custom claim values read out of the token payload into CEL values.

cel-go reads the adapter off the environment being configured; the port has no equivalent hook. The default handles every value a token string can decode to, so this is only needed for a token built by hand whose payload holds custom types.


readonly optional clock?: () => Timestamp | Date

clock supplies the current time used by time validation.

Timestamp | Date


readonly optional clockLeeway?: Duration

clockLeeway is the tolerance applied when checking the iat, nbf, and exp claims.


readonly optional validateTimes?: boolean

validateTimes rejects tokens whose time claims are not valid at the current time.

When disabled, which is the default, jwt.parse reports only structural problems.


readonly optional version?: number

version selects the JWT library version.