code: public ValidationSessionInfo createSession(HttpServletRequest req, HttpServletResponse res) {
          String key = this.getSessionKey();
          ValidationSessionInfo sessionInfo = new ValidationSessionInfo(req, key);
          this.sessionMap.put(key, sessionInfo);
          res.addCookie(new Cookie("AuthToken", key));
          return sessionInfo;
      }
docs: Create session validation session info.
  
  @param req the req
  @param res the res
  @return the validation session info