Convert jwks.json from file or URL to PEM format:
jwks-to-pubkey jwks.json pubkey-outdir/
jwks-to-pubkey https://token.actions.githubusercontent.com/.well-known/jwksConvert pubkeys to jwks.json (outputs to stdout):
pubkey-to-jwks Resources/keys/*.pemCheck if you have all the required tools:
type jq openssl xxd base64 sed grep tr cut basename Optional:
type curlThere are existing tools to convert different key formats to PEM. Use these to prepare your keys before using this tool. Similarly, the converter outputs keys in PEM format, you can further convert them to other formats.
For example, the use and alg parameters are not supported. The converter focuses
only on the public key conversion, and you can add these parameters using other tools,
for example:
pubkey-to-jwks Resources/keys/*.pem | jq '{ keys: .keys | map(. + { use: "sig" }) }'