Guest User

Untitled

a guest
Dec 4th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. func connection(connection:NSURLConnection!, willSendRequestForAuthenticationChallenge challenge:NSURLAuthenticationChallenge!) {
  2.  
  3. if challenge.previousFailureCount > 1 {
  4.  
  5. } else {
  6. let creds = NSURLCredential(user: usernameTextField.text, password: passwordTextField.text, persistence: NSURLCredentialPersistence.None)
  7. challenge.sender.useCredential(creds, forAuthenticationChallenge: challenge)
  8.  
  9. }
  10.  
  11. }
Add Comment
Please, Sign In to add comment