From 3038e286def4287025f5432a9e873a08aba3fa4b Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:37:15 -0400 Subject: [PATCH] address failingUserAuthenticator and defaultResponseProvider --- Sources/OAuthenticator/Authenticator.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/OAuthenticator/Authenticator.swift b/Sources/OAuthenticator/Authenticator.swift index 9876d3d..96d9060 100644 --- a/Sources/OAuthenticator/Authenticator.swift +++ b/Sources/OAuthenticator/Authenticator.swift @@ -25,7 +25,7 @@ public final class Authenticator { /// A `UserAuthenticator` that always fails. Useful as a placeholder /// for testing and for doing manual authentication with an external /// instance not available at configuration-creation time. - public static nonisolated let failingUserAuthenticator: UserAuthenticator = { _, _ in + public static func failingUserAuthenticator(_ url: URL, _ user: String) throws -> URL { throw AuthenticatorError.failingAuthenticatorUsed } @@ -92,6 +92,7 @@ public final class Authenticator { } /// A default `URLSession`-backed `URLResponseProvider`. + @MainActor public static let defaultResponseProvider: URLResponseProvider = { let session = URLSession(configuration: .default)