docs: protected Cookie convertToCookie(IPortalCookie portalCookie, boolean secure) {
          final Cookie cookie = new Cookie(this.cookieName, portalCookie.getValue());
  
          // Set the cookie's fields
          cookie.setComment(this.comment);
          cookie.setMaxAge(this.maxAge);
          cookie.setSecure(secure);
          cookie.setHttpOnly(true);
          if (this.domain != null) {
              cookie.setDomain(this.domain);
          }
  
          cookie.setPath(this.path);
  
          return cookie;
      }