func (j *macaroonJar) SetCookies(u *url.URL, cookies []*http.Cookie) {
	j.underlying.SetCookies(u, cookies)

	if j.currentCharm == nil {
		// nothing else to do
		return
	}

	mac, err := extractMacaroon(cookies)
	if err != nil {
		j.err = errors.Trace(err)
		logger.Errorf(err.Error())
		return
	}
	if mac == nil {
		return
	}
	if err := j.cache.Set(j.currentCharm, mac); err != nil {
		j.err = errors.Trace(err)
		logger.Errorf("Failed to store macaroon for %s: %s", j.currentCharm, err)
	}
}
// SetCookies handles the receipt of the cookies in a reply for the
// given URL.  Cookies do not persist past a successive call to Activate or
// Deactivate.  If the jar is currently activated, macaroons set via this method
// will be stored in the underlying MacaroonCache for the currently activated
// charm.
SetCookies handles the receipt of the cookies in a reply for the
given URL.  Cookies do not persist past a successive call to Activate or
Deactivate.  If the jar is currently activated, macaroons set via this method
will be stored in the underlying MacaroonCache for the currently activated
charm.
// SetCookies handles the receipt of the cookies in a reply for the // given URL . Cookies do not persist past a successive call to Activate or // Deactivate . If the jar is currently activated macaroons set via this method // will be stored in the underlying MacaroonCache for the currently activated // charm .
func (j *macaroonJar) SetCookies(u *url.URL, cookies []*http.Cookie) {
	j.underlying.SetCookies(u, cookies)
	if j.currentCharm == nil {
		return
	}
	mac, err := extractMacaroon(cookies)
	if err != nil {
		j.err = errors.Trace(err)
		logger.Errorf(err.Error())
		return
	}
	if mac == nil {
		return
	}
	if err := j.cache.Set(j.currentCharm, mac); err != nil {
		j.err = errors.Trace(err)
		logger.Errorf("Failed to store macaroon for %s: %s", j.currentCharm, err)
	}
}
func ( j * macaroonJar ) SetCookies ( u * url . URL , cookies [ ] * http . Cookie ) { j . underlying . SetCookies ( u , cookies ) if j . currentCharm == nil { return } mac , err := extractMacaroon ( cookies ) if err != nil { j . err = errors . Trace ( err ) logger . Errorf ( err . Error ( ) ) return } if mac == nil { return } if err := j . cache . Set ( j . currentCharm , mac ) ; err != nil { j . err = errors . Trace ( err ) logger . Errorf ( " " , j . currentCharm , err ) } }
SetCookies handles the receipt of the cookies in a reply for the
given URL.
SetCookies handles the receipt of the cookies in a reply for the given URL .
// nothing else to do