# Need help converting Javascript JWT parsing into Java using Auth0 libs

**URL:** <https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387>\
**Category:** JWT.io\
**Tags:** jwt, java-jwt-support-doc, java, javascript\
**Created:** [August 3, 2020, 3:21pm UTC](https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387 "2020-08-03T15:21:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackiegleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jackiegleason/32/8119_2.png) [@jackiegleason](https://community.auth0.com/u/jackiegleason)\
**Post date:** [August 3, 2020, 3:21pm UTC](https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387/1 "2020-08-03T15:21:00Z")

</div>

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()
verifier.verify(accessToken)

```

Can you provide a similar example for Java?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 4, 2020, 2:06pm UTC](https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387/2 "2020-08-04T14:06:33Z")

</div>

Hey there!

Can you raise it as an issue in:

> **[GitHub - auth0/java-jwt: Java implementation of JSON Web Token (JWT)](https://github.com/auth0/java-jwt)**
>
> Java implementation of JSON Web Token (JWT). Contribute to auth0/java-jwt development by creating an account on GitHub.

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