isValidJwt

fun isValidJwt(jwt: String, requiredFields: List<String> = emptyList()): Boolean

Check if a string is a valid JWT with the required fields.

Return

True if the JWT is valid and contains the required fields, false otherwise.

Parameters

jwt

The JWT string to validate.

requiredFields

A map of field names to check in the payload.