• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple independent cookie stores?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple independent cookie stores?


  • Subject: Multiple independent cookie stores?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 08 Jan 2015 11:46:56 -0800

In the project I work on we've realized* that we need to run NSURLConnections with independent HTTP cookie stores. For instance, a client of our framework could configure multiple replications and have them log in as different Facebook users. (Or the equivalent, for some other auth mechanism that uses session cookies.)

The problem is that the frameworks don't seem to support this. NSURLCookieStore is essentially a singleton object; at least, there's no API to create instances of it. NSURLConnection can only use the shared instance. NSURLSessionConfiguration does allows some control over cookie storage, but it looks like the only option besides shared is to use non-persistent storage, which doesn't work for us (since FB login cookies need to persist across launches.)

It kind of looks like we'd have to disable Foundation's cookie handling, parse the Cookie: and Set-Cookie: headers ourselves, and implement our own persistent storage. I really, really don't want to do this, especially because bugs in the way we manage session cookies could result in security holes.

Is there any other alternative?

—Jens

* https://github.com/couchbase/couchbase-lite-ios/issues/543
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Multiple independent cookie stores?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
    • Re: Multiple independent cookie stores?
      • From: Jeff Johnson <email@hidden>
  • Prev by Date: Re: Is there something broken with DNS on Yosemite (and earlier OS versions) when running a daemon?
  • Next by Date: Re: Multiple independent cookie stores?
  • Previous by thread: Re: Is there something broken with DNS on Yosemite (and earlier OS versions) when running a daemon?
  • Next by thread: Re: Multiple independent cookie stores?
  • Index(es):
    • Date
    • Thread