Browse Source

Fix typo of `AuthenticationChallengeResponsable`

onevcat 4 năm trước cách đây
mục cha
commit
733d22d456

+ 5 - 2
Sources/Networking/AuthenticationChallengeResponsable.swift

@@ -26,8 +26,11 @@
 
 import Foundation
 
+@available(*, deprecated, message: "Typo. Use `AuthenticationChallengeResponsible` instead", renamed: "AuthenticationChallengeResponsible")
+public typealias AuthenticationChallengeResponsable = AuthenticationChallengeResponsible
+
 /// Protocol indicates that an authentication challenge could be handled.
-public protocol AuthenticationChallengeResponsable: AnyObject {
+public protocol AuthenticationChallengeResponsible: AnyObject {
 
     /// Called when a session level authentication challenge is received.
     /// This method provide a chance to handle and response to the authentication
@@ -61,7 +64,7 @@ public protocol AuthenticationChallengeResponsable: AnyObject {
         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
 }
 
-extension AuthenticationChallengeResponsable {
+extension AuthenticationChallengeResponsible {
 
     public func downloader(
         _ downloader: ImageDownloader,

+ 3 - 3
Sources/Networking/ImageDownloader.swift

@@ -143,7 +143,7 @@ open class ImageDownloader {
     
     /// A responder for authentication challenge. 
     /// Downloader will forward the received authentication challenge for the downloading session to this responder.
-    open weak var authenticationChallengeResponder: AuthenticationChallengeResponsable?
+    open weak var authenticationChallengeResponder: AuthenticationChallengeResponsible?
 
     private let name: String
     private var session: URLSession
@@ -473,8 +473,8 @@ extension ImageDownloader {
     }
 }
 
-// Use the default implementation from extension of `AuthenticationChallengeResponsable`.
-extension ImageDownloader: AuthenticationChallengeResponsable {}
+// Use the default implementation from extension of `AuthenticationChallengeResponsible`.
+extension ImageDownloader: AuthenticationChallengeResponsible {}
 
 // Use the default implementation from extension of `ImageDownloaderDelegate`.
 extension ImageDownloader: ImageDownloaderDelegate {}