I'm trying to learn how to deal with an authentication challenge using NSURLSession
. I've never previously done anything related to secure networking. I've been reading the Authentication Challenges and TLS Chain Validation section in Apple's NSURLSession Programming Guide
and there the object NSURLCredentialStorage
is mentioned, but in its reference I get no further description about why should I use it.
What is the difference between NSURLCredentialStorage
and the Keychain
? What should be the best of them to handle username and passwords securely? I've looking for an example of authentication challenge with NSURLSession
and either NSURLCredentialStorage
and Keychain
with no success, could somebody tell me where could I find one?
Thanks in advance