Compile error when using any of the classes extending JWKGenerator

Issue #274 resolved
Former user created an issue

Hi,

I cannot make use of any of the classes extending JWKGenerator, as this class is declared as package-private.

For example, the following code

@Test
public void test() {
    RSAKey senderJWK = new RSAKeyGenerator(2048)
            .keyID("123")
            .keyUse(KeyUse.SIGNATURE)
            .generate();
}

results in the following error being thrown by the compiler:

Error:(14, 17) java: keyUse(com.nimbusds.jose.jwk.KeyUse) in com.nimbusds.jose.jwk.gen.JWKGenerator is defined in an inaccessible class or interface

Is there a reason for JWKGenerator to not be public?

Thanks!

Comments (2)

  1. Log in to comment