Created
October 22, 2019 01:42
-
-
Save WillBishop/a9f8b024ad393f0a8cfc96cd9bc5cb56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static var username: String{ | |
return keychain.get("username")! | |
} | |
static var password: String{ | |
return keychain.get("password")! | |
} | |
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { | |
completionHandler(.useCredential, URLCredential(user: NetworkManager.username, password: NetworkManager.password, persistence: .synchronizable)) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment