publicKey

fun publicKey(publicKey: PublicKey, algorithms: Set<String> = emptySet()): JwtKeySource

Verifies tokens using the given local publicKey (RSA or EC).

When algorithms is empty (the default), all JWS algorithms matching the key type are accepted: RS256/384/512 and PS256/384/512 for RSA, ES256/384/512 for EC. The token's alg header selects the specific one; kid is ignored and the provided key is always used.