//Set AuthSession Cookie
771442
func (ca *CookieAuth) GetUpdatedAuth() map[string]string {
	am := make(map[string]string)
	if ca.UpdatedAuthToken != "" {
		am["AuthSession"] = ca.UpdatedAuthToken
	}
	return am
}
867784
func (s *UpdateDocumentInput) SetAuthenticationToken(v string) *UpdateDocumentInput {
	s.AuthenticationToken = &v
	return s
}
622321
func (s *UpdateUserInput) SetAuthenticationToken(v string) *UpdateUserInput {
	s.AuthenticationToken = &v
	return s
}
685161
func (c *authenticatedConnection) SetAuthentication(auth driver.Authentication) (driver.Connection, error) {
	result, err := c.conn.SetAuthentication(auth)
	if err != nil {
		return nil, driver.WithStack(err)
	}
	return result, nil
}
134284
func (s *DeleteFolderInput) SetAuthenticationToken(v string) *DeleteFolderInput {
	s.AuthenticationToken = &v
	return s
}
469068
func (s *NewPublicVirtualInterface) SetAuthKey(v string) *NewPublicVirtualInterface {
	s.AuthKey = &v
	return s
}
225438
func (s *AWSSessionCredentials) SetSessionToken(v string) *AWSSessionCredentials {
	s.SessionToken = &v
	return s
}
769841
func (s *GetCurrentUserInput) SetAuthenticationToken(v string) *GetCurrentUserInput {
	s.AuthenticationToken = &v
	return s
}
757061
func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig {
	s.SessionCookieName = &v
	return s
}
954021
func (s *CookieStorer) SetValueForSessionName(w http.ResponseWriter, name, value string, options *sessions.Options) error {
	http.SetCookie(w, sessions.NewCookie(name, value, options))
	return nil
}
1027261
func (c *cookie) setCookie(w http.ResponseWriter, value string, exp time.Time) {
	// Cookie has a Token baked into it
	cookie := http.Cookie{
		Name:     DefaultCookieName,
		Value:    value,
		HttpOnly: true,
		Path:     "/",
	}

	// Only set a cookie to be persistent (endure beyond the browser session)
	// if auth duration is greater than zero
	if c.Lifespan > 0 {
		cookie.Expires = exp
	}
	http.SetCookie(w, &cookie)
}
732101
func (s *CreateSMBFileShareInput) SetAuthentication(v string) *CreateSMBFileShareInput {
	s.Authentication = &v
	return s
}
1025704
func SetUserCookie(w http.ResponseWriter, r *http.Request, user User) {

	cookie := &http.Cookie{
		Name:     Config.CookieName,
		Path:     "/",
		Domain:   r.URL.Host,
		HttpOnly: Config.CookieHttpOnly,
		Secure:   Config.CookieSecure,
	}

	// if not a session cookie set the MaxAge
	if Config.CookieMaxAge > 0 {
		cookie.MaxAge = Config.CookieMaxAge
	}

	SetUserCookieOpts(w, cookie, user)
}
582925
func (s *ProjectSource) SetAuth(v *SourceAuth) *ProjectSource {
	s.Auth = v
	return s
}
18786
func (s *AdminRespondToAuthChallengeOutput) SetSession(v string) *AdminRespondToAuthChallengeOutput {
	s.Session = &v
	return s
}
195089
func (state *UserState) SetUsernameCookie(w http.ResponseWriter, username string) error {
	if username == "" {
		return errors.New("Can't set cookie for empty username")
	}
	if !state.HasUser(username) {
		return errors.New("Can't store cookie for non-existing user")
	}
	// Create a cookie that lasts for a while ("timeout" seconds),
	// this is the equivalent of a session for a given username.
	cookie.SetSecureCookiePath(w, "user", username, state.cookieTime, "/", state.cookieSecret)
	return nil
}
694909
func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutput {
	s.Sessions = v
	return s
}