What does NSURLCredentialPersistenceForSession mean, exactly?
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