How do I handle parsing JWT tokens using JWKS in Java (Scala)

I have the following in my express app

import bearer from "express-oauth2-jwt-bearer";

// Authorization middleware. When used, the Access Token must
// exist and be verified against the Auth0 JSON Web Key Set.
const checkJwt = bearer.auth({
  audience: "",
  issuerBaseURL: "",

const checkScopes = bearer.requiredScopes("access:node");

export {checkJwt, checkScopes};

I am looking for the equivilent in Scala and I came across this basic setup…

    val jwkStore = new JwkStore("{JWKS_FILE_HOST}")
    val keyProvider = new RSAKeyProvider {
      override def getPublicKeyById(s: String): RSAPublicKey = {


      override def getPrivateKey: RSAPrivateKey = {


      override def getPrivateKeyId: String = {


    try {
      val algorithm = Algorithm.RSA256(keyProvider)
      val verifier = JWT.require(algorithm).withIssuer("auth0").build //Reusable verifier instance
      val jwt = verifier.verify(token)
    } catch {
      case exception: JWTVerificationException =>

      //Invalid signature/claims

But I am not sure where JwksStore comes from and I am not sure how to handle things. Can someone provide an example?

The JWKs, (JSON Web Keys) are found at /.well-known/jwks.json of your auth0 tenant. They are public values and you do not need authorization to request them.

Sorry I know what it is and where it is but I dont know how to reference it in the jwt module provided