Build Information
Failed to build OAuthenticator, reference main (b3c0f9
), with Swift 6.1 for Wasm on 30 May 2025 14:00:50 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ChimeHQ/OAuthenticator.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/ChimeHQ/OAuthenticator
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at b3c0f98 Update README.md
Cloned https://github.com/ChimeHQ/OAuthenticator.git
Revision (git rev-parse @):
b3c0f9896d7fff9c1cb264032a7321d2a12f04d8
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/ChimeHQ/OAuthenticator.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/ChimeHQ/OAuthenticator.git
https://github.com/ChimeHQ/OAuthenticator.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "OAuthenticator",
"name" : "OAuthenticator",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "maccatalyst",
"version" : "13.0"
},
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "tvos",
"version" : "13.0"
},
{
"name" : "watchos",
"version" : "7.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "OAuthenticator",
"targets" : [
"OAuthenticator"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "OAuthenticatorTests",
"module_type" : "SwiftTarget",
"name" : "OAuthenticatorTests",
"path" : "Tests/OAuthenticatorTests",
"sources" : [
"AuthenticatorTests.swift",
"DPoPSignerTests.swift",
"GitHubTests.swift",
"GoogleTests.swift",
"MastodonTests.swift",
"PKCETests.swift"
],
"target_dependencies" : [
"OAuthenticator"
],
"type" : "test"
},
{
"c99name" : "OAuthenticator",
"module_type" : "SwiftTarget",
"name" : "OAuthenticator",
"path" : "Sources/OAuthenticator",
"product_memberships" : [
"OAuthenticator"
],
"resources" : [
{
"path" : "/host/spi-builder-workspace/Sources/OAuthenticator/PrivacyInfo.xcprivacy",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"ASWebAuthenticationSession+Utility.swift",
"Authenticator.swift",
"CredentialWindowProvider.swift",
"DPoPKey.swift",
"DPoPSigner.swift",
"Data+Base64URLEncode.swift",
"Models.swift",
"PKCE.swift",
"Services/Bluesky.swift",
"Services/GitHub.swift",
"Services/GoogleAPI.swift",
"Services/Mastodon.swift",
"URL+QueryParams.swift",
"URLSession+ResponseProvider.swift",
"WebAuthenticationSession+Utility.swift",
"WellknownEndpoints.swift"
],
"type" : "library"
}
],
"tools_version" : "5.10"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/3] Write sources
[0/3] Copying PrivacyInfo.xcprivacy
[2/3] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/19] Emitting module OAuthenticator
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
[5/21] Compiling OAuthenticator URLSession+ResponseProvider.swift
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
[6/21] Compiling OAuthenticator WebAuthenticationSession+Utility.swift
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
[7/21] Compiling OAuthenticator GitHub.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:128:17: error: cannot find 'URLRequest' in scope
126 | }
127 |
128 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
129 |
130 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:161:17: error: cannot find 'URLRequest' in scope
159 | }
160 |
161 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
162 | request.httpMethod = "POST"
163 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:211:23: error: cannot find 'URLRequest' in scope
209 | }
210 |
211 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
212 | request.httpMethod = "POST"
213 | request.setValue("application/json", forHTTPHeaderField: "Accept")
[8/21] Compiling OAuthenticator GoogleAPI.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:128:17: error: cannot find 'URLRequest' in scope
126 | }
127 |
128 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
129 |
130 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:161:17: error: cannot find 'URLRequest' in scope
159 | }
160 |
161 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
162 | request.httpMethod = "POST"
163 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:211:23: error: cannot find 'URLRequest' in scope
209 | }
210 |
211 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
212 | request.httpMethod = "POST"
213 | request.setValue("application/json", forHTTPHeaderField: "Accept")
[9/21] Compiling OAuthenticator PKCE.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Bluesky.swift:147:18: error: cannot find 'URLRequest' in scope
145 | )
146 |
147 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
148 |
149 | request.httpMethod = "POST"
[10/21] Compiling OAuthenticator Bluesky.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Bluesky.swift:147:18: error: cannot find 'URLRequest' in scope
145 | )
146 |
147 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
148 |
149 | request.httpMethod = "POST"
[11/21] Compiling OAuthenticator Mastodon.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:132:17: error: cannot find 'URLRequest' in scope
130 | }
131 |
132 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
133 |
134 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:174:17: error: cannot find 'URLRequest' in scope
172 | }
173 |
174 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
175 |
176 | request.httpMethod = "POST"
[12/21] Compiling OAuthenticator URL+QueryParams.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:132:17: error: cannot find 'URLRequest' in scope
130 | }
131 |
132 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
133 |
134 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:174:17: error: cannot find 'URLRequest' in scope
172 | }
173 |
174 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
175 |
176 | request.httpMethod = "POST"
[13/21] Compiling OAuthenticator WellknownEndpoints.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:59:38: error: cannot find 'URLRequest' in scope
57 | }
58 |
59 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
60 |
61 | return try JSONDecoder().decode(ServerMetadata.self, from: data)
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:83:38: error: cannot find 'URLRequest' in scope
81 | }
82 |
83 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
84 |
85 | return try JSONDecoder().decode(ClientMetadata.self, from: data)
[14/21] Compiling OAuthenticator resource_bundle_accessor.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:59:38: error: cannot find 'URLRequest' in scope
57 | }
58 |
59 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
60 |
61 | return try JSONDecoder().decode(ServerMetadata.self, from: data)
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:83:38: error: cannot find 'URLRequest' in scope
81 | }
82 |
83 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
84 |
85 | return try JSONDecoder().decode(ClientMetadata.self, from: data)
[15/21] Compiling OAuthenticator DPoPKey.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:31: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
126 |
127 | nonce = newValue
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
126 |
127 | nonce = newValue
[16/21] Compiling OAuthenticator DPoPSigner.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:31: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
126 |
127 | nonce = newValue
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
126 |
127 | nonce = newValue
[17/21] Compiling OAuthenticator Data+Base64URLEncode.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
184 | throw AuthenticatorError.httpResponseExpected
185 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | throw AuthenticatorError.httpResponseExpected
185 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:187:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
185 | }
186 |
187 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 | return .refresh
189 | }
[18/21] Compiling OAuthenticator Models.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
184 | throw AuthenticatorError.httpResponseExpected
185 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | throw AuthenticatorError.httpResponseExpected
185 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:187:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
185 | }
186 |
187 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 | return .refresh
189 | }
[19/21] Compiling OAuthenticator ASWebAuthenticationSession+Utility.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
[20/21] Compiling OAuthenticator Authenticator.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
[21/21] Compiling OAuthenticator CredentialWindowProvider.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/17] Compiling OAuthenticator ASWebAuthenticationSession+Utility.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
[3/17] Compiling OAuthenticator Authenticator.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
[4/17] Compiling OAuthenticator CredentialWindowProvider.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:309:68: error: 'nil' requires a contextual type
307 | parRequestURI: parRequestURI,
308 | stateToken: stateToken,
309 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) }
| `- error: 'nil' requires a contextual type
310 | )
311 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:322:68: error: 'nil' requires a contextual type
320 | credentials: config.appCredentials,
321 | redirectURL: callbackURL,
322 | responseProvider: { try await self.dpopResponse(for: $0, login: nil) },
| `- error: 'nil' requires a contextual type
323 | stateToken: stateToken,
324 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:348:118: error: 'nil' requires a contextual type
346 |
347 | do {
348 | let login = try await refreshProvider(login, config.appCredentials, { try await self.dpopResponse(for: $0, login: nil) })
| `- error: 'nil' requires a contextual type
349 |
350 | try await storeLogin(login)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:370:17: error: cannot find 'URLRequest' in scope
368 | let clientId = config.appCredentials.clientId
369 |
370 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "POST"
372 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:392:66: error: 'nil' requires a contextual type
390 | request.httpBody = Data(body.utf8)
391 |
392 | let (parData, _) = try await dpopResponse(for: request, login: nil)
| `- error: 'nil' requires a contextual type
393 |
394 | return try JSONDecoder().decode(PARResponse.self, from: parData)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
[5/17] Compiling OAuthenticator URLSession+ResponseProvider.swift
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
[6/17] Compiling OAuthenticator WebAuthenticationSession+Utility.swift
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/19] Emitting module OAuthenticator
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:36: error: cannot find type 'URLRequest' in scope
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
142 | let userAuthenticator = config.userAuthenticator
143 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:141:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |
140 | /// Add authentication for `request`, execute it, and return its result.
141 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | let userAuthenticator = config.userAuthenticator
143 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:43: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
183 | var authedRequest = request
184 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:182:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | }
181 |
182 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | var authedRequest = request
184 | let token = login.accessToken.value
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:41: error: cannot find type 'URLRequest' in scope
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:413:91: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
411 | }
412 |
413 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
414 | guard let generator = config.tokenHandling.dpopJWTGenerator else {
415 | return try await urlLoader(request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:128:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
126 | self.config = config
127 |
128 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
129 | }
130 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/URLSession+ResponseProvider.swift:10:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
8 | }
9 |
10 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
11 | /// Convert a `URLSession` instance into a `URLResponseProvider`.
12 | public var responseProvider: URLResponseProvider {
[8/19] Compiling OAuthenticator Data+Base64URLEncode.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
184 | throw AuthenticatorError.httpResponseExpected
185 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | throw AuthenticatorError.httpResponseExpected
185 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:187:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
185 | }
186 |
187 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 | return .refresh
189 | }
[9/19] Compiling OAuthenticator Models.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:147:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
146 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
147 | public typealias ResponseStatusProvider = @Sendable ((Data, URLResponse)) throws -> ResponseStatus
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | public let authorizationURLProvider: AuthorizationURLProvider
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:177:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
175 |
176 | @Sendable
177 | public static func allResponsesValid(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
178 | return .valid
179 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:182:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 |
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | guard let response = result.1 as? HTTPURLResponse else {
184 | throw AuthenticatorError.httpResponseExpected
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
184 | throw AuthenticatorError.httpResponseExpected
185 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:183:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | @Sendable
182 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
183 | guard let response = result.1 as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | throw AuthenticatorError.httpResponseExpected
185 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:187:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
185 | }
186 |
187 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 | return .refresh
189 | }
[10/19] Compiling OAuthenticator GitHub.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:128:17: error: cannot find 'URLRequest' in scope
126 | }
127 |
128 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
129 |
130 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:161:17: error: cannot find 'URLRequest' in scope
159 | }
160 |
161 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
162 | request.httpMethod = "POST"
163 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:211:23: error: cannot find 'URLRequest' in scope
209 | }
210 |
211 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
212 | request.httpMethod = "POST"
213 | request.setValue("application/json", forHTTPHeaderField: "Accept")
[11/19] Compiling OAuthenticator GoogleAPI.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:109:93: error: cannot find type 'URLRequest' in scope
107 | }
108 |
109 | static func authenticationRequest(with url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
110 | let code = try url.authorizationCode
111 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GitHub.swift:128:17: error: cannot find 'URLRequest' in scope
126 | }
127 |
128 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
129 |
130 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:122:88: error: cannot find type 'URLRequest' in scope
120 | ///
121 | /// The `code` is exchanged for an access / refresh token pair using the granted scope in part 1
122 | static func authenticationRequest(url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | let code = try url.authorizationCode
124 |
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:192:102: error: cannot find type 'URLRequest' in scope
190 | /// - appCredentials: The Application credentials
191 | /// - Returns: The URLRequest to refresh the access token
192 | static func authenticationRefreshRequest(login: Login, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
193 | guard let refreshToken = login.refreshToken,
194 | !refreshToken.value.isEmpty else { throw AuthenticatorError.missingRefreshToken }
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:161:17: error: cannot find 'URLRequest' in scope
159 | }
160 |
161 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
162 | request.httpMethod = "POST"
163 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Services/GoogleAPI.swift:211:23: error: cannot find 'URLRequest' in scope
209 | }
210 |
211 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
212 | request.httpMethod = "POST"
213 | request.setValue("application/json", forHTTPHeaderField: "Accept")
[12/19] Compiling OAuthenticator DPoPKey.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:31: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
126 |
127 | nonce = newValue
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
126 |
127 | nonce = newValue
[13/19] Compiling OAuthenticator DPoPSigner.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:21: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | case requestInvalid(URLRequest)
52 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:51:22: error: cannot find type 'URLRequest' in scope
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
51 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
52 | }
53 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:50:7: warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
48 |
49 | public enum DPoPError: Error {
50 | case nonceExpected(URLResponse)
| `- warning: associated value 'nonceExpected' of 'Sendable'-conforming enum 'DPoPError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
51 | case requestInvalid(URLRequest)
52 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:70:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
68 | }
69 |
70 | public typealias NonceDecoder = (Data, URLResponse) throws -> String
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | public typealias JWTGenerator = @Sendable (JWTParameters) async throws -> String
72 | private let nonceDecoder: NonceDecoder
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:75:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | public var nonce: String?
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
77 | print("data:", String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:91:20: error: cannot find type 'URLRequest' in scope
89 | extension DPoPSigner {
90 | public func authenticateRequest(
91 | _ request: inout URLRequest,
| `- error: cannot find type 'URLRequest' in scope
92 | isolation: isolated (any Actor),
93 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:124:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
122 |
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
126 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:134:16: error: cannot find type 'URLRequest' in scope
132 | public func response(
133 | isolation: isolated (any Actor),
134 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
135 | using jwtGenerator: JWTGenerator,
136 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:140:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | issuingServer: String?,
139 | provider: URLResponseProvider
140 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var request = request
142 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:31: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:76:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
74 |
75 | public static func nonceHeaderDecoder(data: Data, response: URLResponse) throws -> String {
76 | guard let value = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
77 | print("data:", String(decoding: data, as: UTF8.self))
78 | throw DPoPError.nonceExpected(response)
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
126 |
127 | nonce = newValue
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:125:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
123 | @discardableResult
124 | public func setNonce(from response: URLResponse) -> Bool {
125 | let newValue = (response as? HTTPURLResponse)?.value(forHTTPHeaderField: "dpop-nonce")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
126 |
127 | nonce = newValue
[14/19] Compiling OAuthenticator Mastodon.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:132:17: error: cannot find 'URLRequest' in scope
130 | }
131 |
132 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
133 |
134 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:174:17: error: cannot find 'URLRequest' in scope
172 | }
173 |
174 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
175 |
176 | request.httpMethod = "POST"
[15/19] Compiling OAuthenticator URL+QueryParams.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:111:126: error: cannot find type 'URLRequest' in scope
109 | }
110 |
111 | static func authenticationRequest(with parameters: UserTokenParameters, url: URL, appCredentials: AppCredentials) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
112 | let code = try url.authorizationCode
113 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:132:17: error: cannot find 'URLRequest' in scope
130 | }
131 |
132 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
133 |
134 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Mastodon.swift:174:17: error: cannot find 'URLRequest' in scope
172 | }
173 |
174 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
175 |
176 | request.httpMethod = "POST"
[16/19] Compiling OAuthenticator PKCE.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Bluesky.swift:147:18: error: cannot find 'URLRequest' in scope
145 | )
146 |
147 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
148 |
149 | request.httpMethod = "POST"
[17/19] Compiling OAuthenticator Bluesky.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/Services/Bluesky.swift:147:18: error: cannot find 'URLRequest' in scope
145 | )
146 |
147 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
148 |
149 | request.httpMethod = "POST"
[18/19] Compiling OAuthenticator WellknownEndpoints.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:59:38: error: cannot find 'URLRequest' in scope
57 | }
58 |
59 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
60 |
61 | return try JSONDecoder().decode(ServerMetadata.self, from: data)
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:83:38: error: cannot find 'URLRequest' in scope
81 | }
82 |
83 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
84 |
85 | return try JSONDecoder().decode(ClientMetadata.self, from: data)
[19/19] Compiling OAuthenticator resource_bundle_accessor.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:10:51: error: cannot find type 'URLRequest' in scope
8 | /// This is used to abstract the actual networking system from the underlying authentication
9 | /// mechanism.
10 | public typealias URLResponseProvider = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Holds an access token value and its expiry.
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:59:38: error: cannot find 'URLRequest' in scope
57 | }
58 |
59 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
60 |
61 | return try JSONDecoder().decode(ServerMetadata.self, from: data)
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:83:38: error: cannot find 'URLRequest' in scope
81 | }
82 |
83 | let (data, _) = try await provider(URLRequest(url: url))
| `- error: cannot find 'URLRequest' in scope
84 |
85 | return try JSONDecoder().decode(ClientMetadata.self, from: data)
BUILD FAILURE 6.1 wasm