public Cookie createCookie(String str) {
    Cookie cookie = new Cookie(authCookieName, str);
    cookie.setMaxAge(cookieMaxAge);
    if (cookieDomain != null) {
      cookie.setDomain(cookieDomain);
    }
    if (cookiePath != null) {
      cookie.setPath(cookiePath);
    }
    cookie.setSecure(isCookieSecure);
    return cookie;
  }
Generate a server side cookie given the cookie value as the input.
@param str Signed input string token.
@return The generated cookie.
service/src/java/org/apache/hive/service/auth/HttpAuthService.java