code: public static RsaKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters, Provider provider) {
          if (jwk.kid() != null) {
              return new RsaKey(jwk.kid(), jwk.toRSA(includePrivateParameters, provider));
          } else {
              throw new IllegalArgumentException("Json Web Key must have a kid");
          }
      }
docs: Converts JSON web key to RsaKey and include the private key if set to true.
  @param provider the Java security provider.
  @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise.
  @return RsaKey