public String jwt() throws JOSEException {
        if (jwtCreds instanceof JwtSecretCreds) {
            return jwtHS256((JwtSecretCreds) jwtCreds);
        } else {
            return jwtRS256((JwtPrivateKeyCreds) jwtCreds);
        }
    }
@Test
    void jwtSecret() throws Exception {
        byte[] randomBytes = new byte[32];
        new SecureRandom().nextBytes(randomBytes);
        String jwt = new JwtGenerator(new JwtSecretCreds(randomBytes, "nick", "subject",
                120)).jwt();
        SignedJWT signedJWT = SignedJWT.parse(jwt);
        JWSVerifier verifier = new MACVerifier(randomBytes);
        Assertions.assertTrue(signedJWT.verify(verifier));
    }