Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSURLCredentialPersistenceForSession: What is meant by session here?

I noticed that you can make credentials with session persistence. What does this mean though in this context? I don't see how this relates or gets connected up to to say a web server session.

Is there a separate concept of session in iOS apps as I don't understand what this would do if you added such credential to storage.

The reason I was looking at this is that the permanent credential is shared when added to an NSURLCredentialStorage. I am not happy with the idea of any random app being able to access my customer's credentials. At the same time I don't want to have to have the user enter credentials each time they start the app, I want them available till a logout or credential change.

like image 937
user2022581 Avatar asked Nov 28 '25 12:11

user2022581


1 Answers

A session in this case is until the App that placed the credential in the store exits. It's not guaranteed to stay the whole time, and I'm unclear on whether it is persistent across backgrounding on iOS, but it definitely does not persist across application exits, and is not tied to a single connection lifetime. Of course, this is all experimental knowledge, as the documentation only states that it isn't stored in the shared space.

like image 98
gaige Avatar answered Dec 01 '25 03:12

gaige



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!