validatePublicKey

Validates the provided Jwk (JSON Web Key) is a public key

This function checks the following:

  • The key must be a public key

  • The key must be a valid Ed25519 key

If any of these checks fail, this function throws an IllegalArgumentException with a descriptive error message.

Parameters

key

The Jwk to validate.

Throws

if the key is not a public key