Defines the names of the cookies used by User Switching.
543751
public function action_plugins_loaded() {
		// User Switching's auth_cookie
		if ( ! defined( 'USER_SWITCHING_COOKIE' ) ) {
			define( 'USER_SWITCHING_COOKIE', 'wordpress_user_sw_' . COOKIEHASH );
		}

		// User Switching's secure_auth_cookie
		if ( ! defined( 'USER_SWITCHING_SECURE_COOKIE' ) ) {
			define( 'USER_SWITCHING_SECURE_COOKIE', 'wordpress_user_sw_secure_' . COOKIEHASH );
		}

		// User Switching's logged_in_cookie
		if ( ! defined( 'USER_SWITCHING_OLDUSER_COOKIE' ) ) {
			define( 'USER_SWITCHING_OLDUSER_COOKIE', 'wordpress_user_sw_olduser_' . COOKIEHASH );
		}
	}
172728
function check_cookies()
	{
		if (!$this->user['auth'] && isset($_COOKIE['eresus_login']))
		{
			if (!$this->login($_COOKIE['eresus_login'], $_COOKIE['eresus_key'], true, true))
			{
				$this->clear_login_cookies();
			}
		}
	}
290158
function (name) {
    var updateCookieVals = "";
    var cookieVals = $.cookie(this.cookieName).split("|");
    var k = 0;
    for (var i = 0; i < cookieVals.length; i++) {
      var fieldVals = cookieVals[i].split("~");
      if (fieldVals[0] != name) {
        updateCookieVals += (k === 0) ? fieldVals[0]+"~"+fieldVals[1] : "|"+fieldVals[0]+"~"+fieldVals[1];
        k++;
      }
    }
    $.cookie(this.cookieName,updateCookieVals);
  }
1034030
public function set_auth_cookie()
    {
        $this->cookie = $this->_mkcookie($this->now);
        rcube_utils::setcookie($this->cookiename, $this->cookie, 0);
        $_COOKIE[$this->cookiename] = $this->cookie;
    }
138028
protected function checkCookie()
    {
        if (is_array($this->cookie) && count($this->cookie)) {
            foreach ($this->cookie as $name => $value) {
                switch ($name) {
                    case 'domain':
                    case 'path':
                        $this->addCookieOption($name, $value);
                        break;
                    case 'max-age':
                    case 'expires':
                        $this->addCookieIntOption($name, $value);
                        break;
                    case 'secure':
                        $this->addCookieBoolOption($name, $value);
                        break;
                }
            }
        }
    }
1139068
def cookies(self):
        
        return (self.get_query()
                .select(PageView.ip, PageView.headers['Cookie'])
                .where(PageView.headers['Cookie'].is_null(False))
                .tuples())
1246751
function(newuser, newaliases) {
		console.log("setUser", newuser, newaliases);
		var oldxid = Login.user && Login.user.xid;
		if (Login.user && Login.user.xid === newuser.xid) {
			// keep old info... but newuser overrides
			newuser = $.extend({}, Login.user, newuser);
			// TODO extend aliases
		}
		// set user
		Login.user = newuser;
		// service
		if ( ! Login.user.service) {
			Login.user.service = getService(Login.user.xid);
		}
		// set aliases
		if (newaliases && newaliases.length !== 0) {
			Login.aliases = newaliases;
			assert(newaliases[0].xid, newaliases);
		} else if (newuser.xid === oldxid) {
			// leave as is
		} else {
			// aliases = just the user
			Login.aliases = [newuser];
		}
		Cookies.set(COOKIE_UXID, Login.user.xid, {path: COOKIE_PATH});
		// webtoken: set by the server
		if (oldxid != newuser.xid) {
			Login.change();
		}
	}
391124
function parseCookiesNames(cookieValue) {
  var cookies = [];

  if (!cookieValue || cookieValue === '') {
    return cookies;
  }

  var ary = cookieValue.toString().split(/;\s+/);
  ary.forEach(function(ck) {
    var ck = ck.trim();
    if (ck !== '') {
      var parsed = ck.split('=')[0];
      if (parsed && parsed !== '') {
        cookies.push(parsed.toLowerCase().trim());
      }
    }
  });

  cookies = filterByWhitelist(cookies, globalOptions.cookieWhitelist);
  return cookies.sort();
}
980901
def set_cookie(self, cookie):
        """"""
        c = self._cookies
        self._cookies_lock.acquire()
        try:
            if cookie.domain not in c: c[cookie.domain] = {}
            c2 = c[cookie.domain]
            if cookie.path not in c2: c2[cookie.path] = {}
            c3 = c2[cookie.path]
            c3[cookie.name] = cookie
        finally:
            self._cookies_lock.release()
1319540
private function setVisitorCookie()
    {
        Yii::$app->response->cookies->add(new Cookie([
            'name' => $this->visitorCookieName,
            'value' => $this->visitor->getPrimaryKey(),
            'expire' => time() + $this->visitorCookieTime,
        ]));
    }
547202
def cookies(self) -> Dict[str, str]:
        """"""
        cookies = SimpleCookie()
        cookies.load(self.headers.get('Cookie', ''))
        return {key: cookie.value for key, cookie in cookies.items()}
879378
protected function setCookie(): void
	{
		if($this->options['cookie_options']['secure'] && !$this->request->isSecure())
		{
			throw new RuntimeException('Attempted to set a secure cookie over a non-secure connection.');
		}

		$this->response->getCookies()->addSigned($this->options['name'], $this->sessionId, $this->options['cookie_ttl'], $this->options['cookie_options']);
	}
879174
private function setCookiesFromHeaders()
    {
        $this->cookies = [];

        $headers = $this->getHeaderAsArray('Set-Cookie');

        foreach ($headers as $line) {
            $cookie = SetCookie::fromHeader($line);
            $this->cookies[$cookie->getName()] = $cookie;
        }
    }
199878
def on_start(self, session, session_context):
        
        session_id = session.session_id
        web_registry = session_context['web_registry']

        if self.is_session_id_cookie_enabled:
            web_registry.session_id = session_id
            logger.debug("Set SessionID cookie using id: " + str(session_id))

        else:
            msg = ("Session ID cookie is disabled.  No cookie has been set for "
                   "new session with id: " + str(session_id))
            logger.debug(msg)
533069
public void setCookies(List<HttpCookie> cookies) {
		Map<String, HttpCookie> map = new HashMap<String, HttpCookie>();
		for (HttpCookie cookie : cookies) {
			map.put(cookie.getName(), cookie);
		}
		this.cookies = map;
	}
52520
def _check_cookie_and_session
      if session[:__reqref]
        tmp = session[:__reqref]
      else
        if cookies.signed[:__reqref]
          tmp = cookies.signed[:__reqref]
          tmp = _increment_returning_count(tmp)
          _set_cookie(__reqref: tmp)
        else
          tmp = "req=#{request.url}|ref=#{request.referrer}|ret=0"
          _set_cookie(__reqref: tmp)
        end
        session[:__reqref] = tmp
      end
    end
776242
def cookies(self):
        
        cookies = SimpleCookie(self.environ.get('HTTP_COOKIE','')).values()
        if len(cookies) > self.MAX_PARAMS:
            raise HTTPError(413, 'Too many cookies')
        return FormsDict((c.key, c.value) for c in cookies)