code: public String generate(byte[] secret) {
      String hp = header.encode() + "." + payload.encode();
      return hp + "." + new String(
        SignerFactory.get(header.algorithm).sign(hp.getBytes(StandardCharsets.UTF_8), secret),
        StandardCharsets.UTF_8
      );
    }
docs: Encode this instance to JWT standard format.
  
  @param secret the signature key
  @return [header].[payload].[signature]