Reputation: 339
Is there anyway to store the sub directory when the protection space is saved in the NSURLCredential
storage.
Tried
NSURLProtectionSpace
but no result of accessing the
property.NSURLCredentialStorage
; one for the host with postfix and one for
the host without postfixThe requirement is to have separate protection space for two virtual domains under the same host.
Ex: http://example.com/vdomain1 and http://example.com/vdomain2
need to check the domain when looking for the credentials for the particular.
Thanks in advance.
Upvotes: 0
Views: 81
Reputation: 339
For anyone has the same issue, here's the solution.
You could use realm property in NSURLProtectionSpace for this purpose.
Reference: https://serverfault.com/questions/67979/what-is-the-technical-definition-of-a-realm
Upvotes: 0