Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)connection:(NSURLConnection *)connection
- if ([challenge previousFailureCount] == 0) {
- NSURLCredential *newCredential;
- newCredential=[NSURLCredential credentialWithUser:[UserManager getUsername]
- password:[UserManager getPassword]
- persistence:NSURLCredentialPersistenceNone];
- [[challenge sender] useCredential:newCredential
- forAuthenticationChallenge:challenge];
- } else {
- [[challenge sender] cancelAuthenticationChallenge:challenge];
- // inform the user that the user name and password
- // in the preferences are incorrect
- }
- }
Add Comment
Please, Sign In to add comment