code: @SneakyThrows
      public static byte[] signJws(final Key key, final byte[] value, final String algHeaderValue) {
          val base64 = EncodingUtils.encodeBase64(value);
          val jws = new JsonWebSignature();
          jws.setEncodedPayload(base64);
          jws.setAlgorithmHeaderValue(algHeaderValue);
          jws.setKey(key);
          jws.setHeader("typ", "JWT");
          return jws.getCompactSerialization().getBytes(StandardCharsets.UTF_8);
      }
docs: Sign jws.
  
  @param key            the key
  @param value          the value
  @param algHeaderValue the alg header value
  @return the byte [ ]