SHOW:
|
|
- or go back to the newest paste.
| 1 | func ResetNSURLCredentials() {
| |
| 2 | - | |
| 2 | + | |
| 3 | - | let dictAllCredentials : NSDictionary = NSURLCredentialStorage.sharedCredentialStorage().allCredentials |
| 3 | + | |
| 4 | for (urlProtectionSpace, users) in NSURLCredentialStorage.sharedCredentialStorage().allCredentials {
| |
| 5 | - | //let tempDictionary : NSDictionary = NSURLCredentialStorage.sharedCredentialStorage().credentialsForProtectionSpace(protectionSpace) |
| 5 | + | for (userName, credential) in users {
|
| 6 | NSURLCredentialStorage.sharedCredentialStorage().removeCredential(credential, forProtectionSpace: protectionSpace) | |
| 7 | - | if(dictAllCredentials.count > 0 ){
|
| 7 | + | |
| 8 | - | |
| 8 | + | |
| 9 | - | var protectionSpaceEnumerator=dictAllCredentials.keyEnumerator() as NSEnumerator |
| 9 | + |