0
votes

I have a JWKS-generated JWT that I need to validate. Due to connectivity reasons, I can't pull the key info from the server directly. So I got the info manually, and would like to plug it into my Spring Boot app to validate my JWT. But I can't find very many examples not using Auth0 to get the key.

So what I have from the site giving me the JWT is this:

"keys": [{
    "kty": "RSA",
    "kid": "testJWT",
    "use": "sig",
    "alg": "RSA",
    "n": "wEYJ85moXdpZT2vEW-jaeJrJnYqHumQpeakzyQJ0BJXDE3rZnxs17bLd_...",
    "e": "AQAB"
}]

I've seen a lot of examples pass in a public key, but from the json, I can't tell what the public key is. Is it the "n"?? Do I need to decode it (I get garbage when I do)? I would love it if someone could post a short snippet of the values I need.

Does this answer your question? Generating Public Key from JWKjps
Almost - that codes generates a key. I'm using one already provided. I just don't know how to construct it.CNDyson
n and e are modulus and exponent of the public key and the garbage you get after decoding is no garbage but binary data.jps
Ok, do you have an example as to how to use that data?CNDyson
in the linked Q/A, the example in the question is showing how to import a JWK and use the values to get a public key that you can use to veriify.jps