code: public void verify(String token, Consumer<Verification> verificationConsumer) throws JWTVerificationException, IllegalArgumentException {
          Verification verifierBuilder = JWT.require(Algorithm.ECDSA512(ecPublicKey, null))
                  .withIssuer(issuer);
          // apply any custom verififaction
          verificationConsumer.accept(verifierBuilder);
          JWTVerifier verifier = verifierBuilder.build();
          verifier.verify(token);
      }
docs: Verifies the token.
  @param token a jwt token.
  @param verificationConsumer a way for you to verify claims by passing in a lambda function that accepts a Verification on which you can call e.g. withSubject, withClaim, etc.
  @throws JWTVerificationException if not valid
  @throws IllegalArgumentException if token is malformed