// Create signer from JWK representation
RSAKey rsaJWK = new RSAKey.Builder(rsaPublicKey).privateKey(rsaPrivateKey).build();
JWSObject jwsObject2 = new JWSObject(new JWSHeader(JWSAlgorithm.RS256), new Payload("test123"));
signer = new RSASSASigner(rsaJWK.toRSAPrivateKey());
jwsObject2.sign(signer);
Base64URL sig2 = jwsObject2.getSignature();
assertTrue("Signature comparison", sig1.equals(sig2));
// Verifier from raw Java RSA key