Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)connection:(NSURLConnection *)aConnection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
- if ([challenge previousFailureCount] == 0) {
- NSURLCredential *newCredential;
- newCredential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone];
- [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge];
- } else {
- [[challenge sender] cancelAuthenticationChallenge:challenge];
- }
- }
Add Comment
Please, Sign In to add comment