• 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
What does NSURLCredentialPersistenceForSession mean, exactly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What does NSURLCredentialPersistenceForSession mean, exactly?


  • Subject: What does NSURLCredentialPersistenceForSession mean, exactly?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 19 Feb 2016 13:18:09 -0800

It’s unclear what the exact behavior of NSURLCredentialPersistenceForSession is. The doc says nothing but "This credential will only be stored for this session,” but it doesn’t define what a “session” is. (Keep in mind that this API came out nine years before NSURLSession.)

— I’ve always interpreted it as “process”, i.e. the credential will be globally available but only until the process exits.

— It could also mean “per NSURLCredentialStorage”, which is equivalent to “per process” because that class is a singleton*.

— It’s possible that these days it _does_ correspond to “per NSURLSession”, but I don’t see anything that says so. If it did, that would be very useful for my project, which needs to be able to communicate with the same REST API simultaneously as different user accounts.

Could someone clarify?

—Jens

* which makes me wonder why NSURLSessionConfiguration has a URLCredentialStorage property, since there’s no way to create another object to point that property at. Same goes for the HTTPCookieStorage property.
 _______________________________________________
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: What does NSURLCredentialPersistenceForSession mean, exactly?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Prev by Date: Re: CFNetwork is not adding Authorization: headers proactively
  • Next by Date: Re: CFNetwork is not adding Authorization: headers proactively
  • Previous by thread: Re: CFNetwork is not adding Authorization: headers proactively
  • Next by thread: Re: What does NSURLCredentialPersistenceForSession mean, exactly?
  • Index(es):
    • Date
    • Thread