code: function Session(req, res, cookies, opts) {
    this.req = req;
    this.res = res;
    this.cookies = cookies;
    this.opts = opts;
    if (opts.cookie.ephemeral && opts.cookie.maxAge) {
      throw new Error("you cannot have an ephemeral cookie with a maxAge.");
    }
  
    this.content = {};
    this.json = JSON.stringify(this._content);
    this.loaded = false;
    this.dirty = false;
  
    // no need to initialize it, loadFromCookie will do
    // via reset() or unbox()
    this.createdAt = null;
    this.duration = opts.duration;
    this.activeDuration = opts.activeDuration;
  
    // support for maxAge
    if (opts.cookie.maxAge) {
      this.expires = new Date(new Date().getTime() + opts.cookie.maxAge);
    } else {
      this.updateDefaultExpires();
    }
  
    // here, we check that the security bits are set correctly
    var secure = (res.socket && res.socket.encrypted) ||
        (req.connection && req.connection.proxySecure);
    if (opts.cookie.secure && !secure) {
      throw new Error("you cannot have a secure cookie unless the socket is " +
          " secure or you declare req.connection.proxySecure to be true.");
    }
  }
docs: /*
  Session object
  
  this should be implemented with proxies at some point