Browse Source

Unwrap optionals for basic auth credentials

John Gibb 11 years ago
parent
commit
943047043b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/Alamofire.swift

+ 2 - 2
Source/Alamofire.swift

@@ -1224,11 +1224,11 @@ extension Request: DebugPrintable {
             let protectionSpace = NSURLProtectionSpace(host: URL.host!, port: URL.port ?? 0, `protocol`: URL.scheme, realm: URL.host, authenticationMethod: NSURLAuthenticationMethodHTTPBasic)
             if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values.array {
                 for credential: NSURLCredential in (credentials as [NSURLCredential]) {
-                    components.append("-u \(credential.user):\(credential.password)")
+                    components.append("-u \(credential.user!):\(credential.password!)")
                 }
             } else {
                 if let credential = delegate.credential {
-                    components.append("-u \(credential.user):\(credential.password)")
+                    components.append("-u \(credential.user!):\(credential.password!)")
                 }
             }
         }