docs: public static Cookie encodeCookie(SessionInfo info) {
          // create a cookie using the configuration information
          HttpSession session = info.getSession();
          SessionConfig config = info.getSessionConfig();
          Cookie cookie = new Cookie(
                          config.getIDName(),
                          config.getSessionVersion() + session.getId());
          cookie.setSecure(config.isCookieSecure());
          cookie.setMaxAge(config.getCookieMaxAge());
          cookie.setPath(config.getCookiePath());
          cookie.setDomain(config.getCookieDomain());
  
          return cookie;
      }