ios - NSURLConnection's delegate method, asking for authenticationChallenge is not getting fired? -
I use the NSURL connection to call the webservice and my key is in China with a client certificate I had the connection to the After I removed this certificate and for the bunch of keys Adding a new, NSURLConnection still keeps the credentials that I've already given it and I Pass 417 with the error code, which was 200, before I remove the old certificate. Ask NSURLConnection for credentials, forcefully Or how to close the credentials of an existing SSL connection or authentication challenge. TLS First of all it is a possibility that what is happening with you, TLS layer is credential caching. This is due to the fact that the TLS connection is computational to install []. The possible solution is to change the DNS name that you are using, for example by adding a dot (.) To the string since the DNS protocol ends in the dots as a fully qualified DNS name Accepting the string containing the string. I have seen people adding a hashtag (#) to all URL requests and thus never see the system for a stored credential, but only started calling instead of Cookies Another possibility is that the server is setting a cookie that you will need to clear, you can do this by doing the following : NSURLCredentialStorage It may now be that the credentials are still stored in I hope this will help - (zero) connection: (NSURLConnection *) receiverment challenge: (NSURLAuthenticationChallenge *) challenge
NSURL Connection is playful animal, and I have been similar in the past few days I'm having problems But I have found a solution to my problem and there are some suggestions that what could possibly be due to any problems you may have.
didRecieveAuthenticationChallenge . []
- Clear (zero) cookies: (NSString *) urlString {NSHTTPCookieStorage * cookiestorage = [NSHTTPCookieStorage sharedCookieStorage]; NSDRL * URL = [[NSRL Alok] InitvistString URL String]; NSArray * Cookies = [Cookies Storage Cookies for URL: Templar]; (NSHTpc Cookies * for cookies in cookies) {// Repeat on all cookies and delete them [cookiestorage deleteCookie: cookie]; }}
shared credential storage And should be erased by doing so below:
NSURLCredentialStorage * store = [NSURLCredentialStorage Shared CredentialStorage]; If (store! = Void) {{NSURLProtectionSpace * Security everywhere [store in all credentials]) {NSDictionary * map = [[NSURLCredentialStorage shared credentialstorage] CredentialspressationSpace: Protection Space]; If (map! = Zero) {for (NSString * in user map) {NSURLCredential * cred = [map objectForKey: user]; [Credentials for deletion of store: credits for protection: securityspace]; }}}}
Comments
Post a Comment