Need help converting Javascript JWT parsing into Java using Auth0 libs

Hey everyone,

Currently I am using the node-jsonwebtoken lib you guys put out to parse my JWT access token. I do this like…

jwt.verify(accessToken, cert, { algorithms : "RSA256" }).then((err, parsed) =>{...});

I would like to do a similar thing in Java using java-jwt (well actually Scala but I don’t see a Scala lib so using the Java one). But when I look at the docs it suggests I need the public key too (which I don’t have and am not sure where to look for it).

val privateKey : RSAKey = ? // Not sure here but from cert var
val algo: Algorithm  = Algorithm.RSA256(?, privateKey) // Or here
val verifier = JWTVerifier.require(algo).build()

Can you provide a similar example for Java?

Hey there!

Can you raise it as an issue in:

so that the tool maintainers can guide you the right way? Thank you!