public static String buildSecretFromJwk(final String json) {
        CommonHelper.assertNotBlank("json", json);

        try {
            val octetSequenceKey = OctetSequenceKey.parse(json);
            return new String(octetSequenceKey.toByteArray(), "UTF-8");
        } catch (final UnsupportedEncodingException | ParseException e) {
            throw new TechnicalException(e);
        }
    }
Build the secret from the JWK JSON.

@param json the json
@return the secret
pac4j-jwt/src/main/java/org/pac4j/jwt/util/JWKHelper.java