Guest User

Untitled

a guest
May 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. -(void)connection:(NSURLConnection *)connection
  2.  
  3. if ([challenge previousFailureCount] == 0) {
  4. NSURLCredential *newCredential;
  5. newCredential=[NSURLCredential credentialWithUser:[UserManager getUsername]
  6. password:[UserManager getPassword]
  7. persistence:NSURLCredentialPersistenceNone];
  8. [[challenge sender] useCredential:newCredential
  9. forAuthenticationChallenge:challenge];
  10.  
  11. } else {
  12.  
  13. [[challenge sender] cancelAuthenticationChallenge:challenge];
  14. // inform the user that the user name and password
  15. // in the preferences are incorrect
  16. }
  17. }
Add Comment
Please, Sign In to add comment