Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func ResetNSURLCredentials() {
- let protectionSpace : NSURLProtectionSpace = NSURLProtectionSpace(host: "xyz.com", port: 0, `protocol`: "http", realm: nil, authenticationMethod: nil)
- for (urlProtectionSpace, users) in NSURLCredentialStorage.sharedCredentialStorage().allCredentials {
- for (userName, credential) in users {
- NSURLCredentialStorage.sharedCredentialStorage().removeCredential(credential, forProtectionSpace: protectionSpace)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement