// SetCookieAuth sets basic parameters for HTTP Cookie
551590
func (s *AuthenticationService) SetCookieAuth(name, value string) {
	s.name = name
	s.secret = value
	s.authType = authTypeCookie
}
1126583
func (b *HttpRequest) SetCookie(cookie *http.Cookie) *HttpRequest {
	b.req.Header.Add("Cookie", cookie.String())
	return b
}
1311793
func SetCookieSession(key string, r *http.Request) {
	c := &http.Cookie{
		Name:  cookieSessionName,
		Value: key,
	}

	r.AddCookie(c)
}
674094
func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs {
	a.Secure = &secure
	return a
}
1188796
func (c *Client) SetAuth(u string, p string) *Client {
	c.Username = u
	c.Password = p
	return c
}
1001581
func (s *H264Settings) SetSubgopLength(v string) *H264Settings {
	s.SubgopLength = &v
	return s
}
258844
func (r *Request) AddCookie(cookie *http.Cookie) *Request {
	r.Use(cookies.Add(cookie))
	return r
}
1372525
func (c *Collector) SetCookies(URL string, cookies []*http.Cookie) error {
	if c.backend.Client.Jar == nil {
		return ErrNoCookieJar
	}
	u, err := url.Parse(URL)
	if err != nil {
		return err
	}
	c.backend.Client.Jar.SetCookies(u, cookies)
	return nil
}
1089041
func (c *Network) SetCookiesWithParams(v *NetworkSetCookiesParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.setCookies", Params: v})
}
583142
func (r *FastHttpHeader) SetCookie(cookie string) {
	if r.isResponse {
		r.Source.(*FastHttpResponse).Original.Response.Header.Add("Set-Cookie", cookie)
	}
}
321732
func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
	return &http.Cookie{
		Name:     name,
		Value:    value,
		Path:     options.Path,
		Domain:   options.Domain,
		MaxAge:   options.MaxAge,
		Secure:   options.Secure,
		HttpOnly: options.HttpOnly,
		SameSite: options.SameSite,
	}

}
160854
func (r *Request) SetEnableCookie(enable bool) *Request {
	r.setting.EnableCookie = enable
	return r
}
876403
func SetUserCookieOpts(w http.ResponseWriter, cookie *http.Cookie, user User) {

	// default cookie expiration
	exp := time.Now().Add(Config.CookieExp)

	// generate cookie valid for 24 hours for user
	// the strings are quoted to ensure they aren't tampered with
	// TODO explore storing string as a URL Parameter String
	userStr := fmt.Sprintf("%q|%q|%q|%q|%q|%q|%q",
							user.Id(), user.Provider(), user.Name(),
							user.Email(), user.Link(), user.Picture(),
							user.Org())

	// set the cookie's value
	cookie.Value = authcookie.New(userStr, exp, Config.CookieSecret)

	// set the cookie
	http.SetCookie(w, cookie)
}
1316754
func (a *SetCookieArgs) SetHTTPOnly(httpOnly bool) *SetCookieArgs {
	a.HTTPOnly = &httpOnly
	return a
}
251198
func (s *Statistics) SetCount(v int64) *Statistics {
	s.Count = &v
	return s
}
1278409
func (s *ApplicationMetrics) SetRequestCount(v int64) *ApplicationMetrics {
	s.RequestCount = &v
	return s
}
765210
func (s *AppCookieStickinessPolicy) SetCookieName(v string) *AppCookieStickinessPolicy {
	s.CookieName = &v
	return s
}