Build Information
Failed to build OAuthenticator, reference main (a5352f), with Swift 6.1 for Wasm on 30 Apr 2026 01:41:11 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:315:68: error: 'nil' requires a contextual type
313 | parRequestURI: parRequestURI,
314 | stateToken: stateToken,
315 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
| `- error: 'nil' requires a contextual type
316 | )
317 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:328:68: error: 'nil' requires a contextual type
326 | credentials: config.appCredentials,
327 | redirectURL: callbackURL,
328 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
| `- error: 'nil' requires a contextual type
329 | stateToken: stateToken,
330 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:357:50: error: 'nil' requires a contextual type
355 | login, config.appCredentials,
356 | {
357 | try await self.dpopResponse(for: $0, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
358 | })
359 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:380:17: error: cannot find 'URLRequest' in scope
378 | let clientId = config.appCredentials.clientId
379 |
380 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
381 | request.httpMethod = "POST"
382 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:402:75: error: 'nil' requires a contextual type
400 | request.httpBody = Data(body.utf8)
401 |
402 | let (data, response) = try await self.dpopResponse(for: request, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
403 |
404 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
[21/25] Compiling OAuthenticator CredentialWindowProvider.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:315:68: error: 'nil' requires a contextual type
313 | parRequestURI: parRequestURI,
314 | stateToken: stateToken,
315 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
| `- error: 'nil' requires a contextual type
316 | )
317 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:328:68: error: 'nil' requires a contextual type
326 | credentials: config.appCredentials,
327 | redirectURL: callbackURL,
328 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
| `- error: 'nil' requires a contextual type
329 | stateToken: stateToken,
330 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:357:50: error: 'nil' requires a contextual type
355 | login, config.appCredentials,
356 | {
357 | try await self.dpopResponse(for: $0, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
358 | })
359 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:380:17: error: cannot find 'URLRequest' in scope
378 | let clientId = config.appCredentials.clientId
379 |
380 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
381 | request.httpMethod = "POST"
382 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:402:75: error: 'nil' requires a contextual type
400 | request.httpBody = Data(body.utf8)
401 |
402 | let (data, response) = try await self.dpopResponse(for: request, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
403 |
404 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
[22/25] Compiling OAuthenticator URL+TargetURI.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[23/25] Compiling OAuthenticator URLHelpers.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[24/25] Compiling OAuthenticator URLSession+ResponseProvider.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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.
[25/25] Compiling OAuthenticator WebAuthenticationSession+Utility.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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.
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:276d66a16377d3ee059b2e3429cbc1154d9f01e42871e5d702fd5d8b9044d93d
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/21] Compiling OAuthenticator DPoPKey.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:80:13: error: type 'DPoPError' does not conform to protocol 'Equatable'
78 | }
79 |
80 | public enum DPoPError: Error, Equatable {
| |- error: type 'DPoPError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- note: associated value type '<<error type>>' does not conform to protocol 'Equatable', preventing synthesized conformance of 'DPoPError' to 'Equatable'
83 | }
84 |
Swift.==:1:24: note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'DPoPError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'DPoPError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
3 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:103:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 |
102 | // Return value is (origin, nonce)
103 | public typealias NonceDecoder = (Data, HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | private let nonceCache: NSCache<NSString, NonceValue> = NSCache()
105 | private let nonceDecoder: NonceDecoder
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/DPoPSigner.swift:107:62: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | private let nonceDecoder: NonceDecoder
106 |
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
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/DPoPSigner.swift:139:14: error: cannot find type 'URLRequest' in scope
137 | extension DPoPSigner {
138 | private func makeRequest(
139 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
140 | isolation: isolated (any Actor),
141 | 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.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:143:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | responseProvider: URLResponseProvider
142 | )
143 | async throws -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 | {
145 | let (data, urlResponse) = try await responseProvider(request)
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/DPoPSigner.swift:160:20: error: cannot find type 'URLRequest' in scope
158 | token: String?,
159 | tokenHash: String?
160 | ) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
161 | guard
162 | let method = request.httpMethod,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:154:14: error: cannot find type 'URLRequest' in scope
152 |
153 | public func buildProof(
154 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
155 | isolation: isolated (any Actor),
156 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:206:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 | isAuthServer: Bool?,
205 | responseProvider: URLResponseProvider
206 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | // FIXME: calculate tokenHash using the value from the request Authorization
208 | // header:
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/DPoPSigner.swift:282:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 | // The logic here is taken from:
281 | // https://github.com/bluesky-social/atproto/blob/4e96e2c7/packages/oauth/oauth-client/src/fetch-dpop.ts#L195
282 | private func isUseDpopError(data: Data, response: HTTPURLResponse, isAuthServer: Bool?) -> Bool {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 | print(
284 | "isAuthServer: " + (isAuthServer == nil ? "nil" : (isAuthServer == true ? "true" : "false")))
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/DPoPSigner.swift:109:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
110 | return nil
111 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:115:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
113 | // I'm not sure why response.url is optional, but maybe we need the request
114 | // passed into the decoder here, to fallback to request.url.origin
115 | guard let responseOrigin = response.url?.origin else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
116 | return nil
117 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:288:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
286 | // https://datatracker.ietf.org/doc/html/rfc9449#name-resource-server-provided-no
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
290 | if wwwAuthHeader.starts(with: "DPoP") {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:289:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
290 | if wwwAuthHeader.starts(with: "DPoP") {
291 | return wwwAuthHeader.contains("error=\"use_dpop_nonce\"")
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:299:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
297 | // https://datatracker.ietf.org/doc/html/rfc9449#name-authorization-server-provid
298 | if isAuthServer == nil || isAuthServer == true {
299 | if response.statusCode == 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
300 | do {
301 | let err = try JSONDecoder().decode(OAuthErrorResponse.self, from: data)
[3/21] Compiling OAuthenticator DPoPSigner.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:80:13: error: type 'DPoPError' does not conform to protocol 'Equatable'
78 | }
79 |
80 | public enum DPoPError: Error, Equatable {
| |- error: type 'DPoPError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- note: associated value type '<<error type>>' does not conform to protocol 'Equatable', preventing synthesized conformance of 'DPoPError' to 'Equatable'
83 | }
84 |
Swift.==:1:24: note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'DPoPError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'DPoPError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
3 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:103:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 |
102 | // Return value is (origin, nonce)
103 | public typealias NonceDecoder = (Data, HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | private let nonceCache: NSCache<NSString, NonceValue> = NSCache()
105 | private let nonceDecoder: NonceDecoder
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/DPoPSigner.swift:107:62: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | private let nonceDecoder: NonceDecoder
106 |
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
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/DPoPSigner.swift:139:14: error: cannot find type 'URLRequest' in scope
137 | extension DPoPSigner {
138 | private func makeRequest(
139 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
140 | isolation: isolated (any Actor),
141 | 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.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:143:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | responseProvider: URLResponseProvider
142 | )
143 | async throws -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 | {
145 | let (data, urlResponse) = try await responseProvider(request)
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/DPoPSigner.swift:160:20: error: cannot find type 'URLRequest' in scope
158 | token: String?,
159 | tokenHash: String?
160 | ) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
161 | guard
162 | let method = request.httpMethod,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:154:14: error: cannot find type 'URLRequest' in scope
152 |
153 | public func buildProof(
154 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
155 | isolation: isolated (any Actor),
156 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:206:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 | isAuthServer: Bool?,
205 | responseProvider: URLResponseProvider
206 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | // FIXME: calculate tokenHash using the value from the request Authorization
208 | // header:
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/DPoPSigner.swift:282:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 | // The logic here is taken from:
281 | // https://github.com/bluesky-social/atproto/blob/4e96e2c7/packages/oauth/oauth-client/src/fetch-dpop.ts#L195
282 | private func isUseDpopError(data: Data, response: HTTPURLResponse, isAuthServer: Bool?) -> Bool {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 | print(
284 | "isAuthServer: " + (isAuthServer == nil ? "nil" : (isAuthServer == true ? "true" : "false")))
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/DPoPSigner.swift:109:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
110 | return nil
111 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:115:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
113 | // I'm not sure why response.url is optional, but maybe we need the request
114 | // passed into the decoder here, to fallback to request.url.origin
115 | guard let responseOrigin = response.url?.origin else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
116 | return nil
117 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:288:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
286 | // https://datatracker.ietf.org/doc/html/rfc9449#name-resource-server-provided-no
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
290 | if wwwAuthHeader.starts(with: "DPoP") {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:289:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
290 | if wwwAuthHeader.starts(with: "DPoP") {
291 | return wwwAuthHeader.contains("error=\"use_dpop_nonce\"")
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:299:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
297 | // https://datatracker.ietf.org/doc/html/rfc9449#name-authorization-server-provid
298 | if isAuthServer == nil || isAuthServer == true {
299 | if response.statusCode == 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
300 | do {
301 | let err = try JSONDecoder().decode(OAuthErrorResponse.self, from: data)
[4/21] Compiling OAuthenticator Data+Base64URLEncode.swift
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:80:13: error: type 'DPoPError' does not conform to protocol 'Equatable'
78 | }
79 |
80 | public enum DPoPError: Error, Equatable {
| |- error: type 'DPoPError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- note: associated value type '<<error type>>' does not conform to protocol 'Equatable', preventing synthesized conformance of 'DPoPError' to 'Equatable'
83 | }
84 |
Swift.==:1:24: note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'DPoPError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'DPoPError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
3 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:103:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 |
102 | // Return value is (origin, nonce)
103 | public typealias NonceDecoder = (Data, HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | private let nonceCache: NSCache<NSString, NonceValue> = NSCache()
105 | private let nonceDecoder: NonceDecoder
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/DPoPSigner.swift:107:62: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | private let nonceDecoder: NonceDecoder
106 |
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
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/DPoPSigner.swift:139:14: error: cannot find type 'URLRequest' in scope
137 | extension DPoPSigner {
138 | private func makeRequest(
139 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
140 | isolation: isolated (any Actor),
141 | 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.
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:143:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | responseProvider: URLResponseProvider
142 | )
143 | async throws -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 | {
145 | let (data, urlResponse) = try await responseProvider(request)
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/DPoPSigner.swift:160:20: error: cannot find type 'URLRequest' in scope
158 | token: String?,
159 | tokenHash: String?
160 | ) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
161 | guard
162 | let method = request.httpMethod,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:154:14: error: cannot find type 'URLRequest' in scope
152 |
153 | public func buildProof(
154 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
155 | isolation: isolated (any Actor),
156 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:206:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 | isAuthServer: Bool?,
205 | responseProvider: URLResponseProvider
206 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | // FIXME: calculate tokenHash using the value from the request Authorization
208 | // header:
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/DPoPSigner.swift:282:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 | // The logic here is taken from:
281 | // https://github.com/bluesky-social/atproto/blob/4e96e2c7/packages/oauth/oauth-client/src/fetch-dpop.ts#L195
282 | private func isUseDpopError(data: Data, response: HTTPURLResponse, isAuthServer: Bool?) -> Bool {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 | print(
284 | "isAuthServer: " + (isAuthServer == nil ? "nil" : (isAuthServer == true ? "true" : "false")))
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/DPoPSigner.swift:109:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
110 | return nil
111 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:115:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
113 | // I'm not sure why response.url is optional, but maybe we need the request
114 | // passed into the decoder here, to fallback to request.url.origin
115 | guard let responseOrigin = response.url?.origin else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
116 | return nil
117 | }
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:288:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
286 | // https://datatracker.ietf.org/doc/html/rfc9449#name-resource-server-provided-no
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
290 | if wwwAuthHeader.starts(with: "DPoP") {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:289:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
287 | if isAuthServer == nil || isAuthServer == false {
288 | if response.statusCode == 401 {
289 | if let wwwAuthHeader = response.value(forHTTPHeaderField: "WWW-Authenticate") {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
290 | if wwwAuthHeader.starts(with: "DPoP") {
291 | return wwwAuthHeader.contains("error=\"use_dpop_nonce\"")
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:299:16: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
297 | // https://datatracker.ietf.org/doc/html/rfc9449#name-authorization-server-provid
298 | if isAuthServer == nil || isAuthServer == true {
299 | if response.statusCode == 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
300 | do {
301 | let err = try JSONDecoder().decode(OAuthErrorResponse.self, from: data)
[5/23] 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"
[6/23] Compiling OAuthenticator URL+Origin.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"
[7/23] 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"
[8/23] 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:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:179:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
178 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
179 | 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.
180 |
181 | 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:209:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 |
208 | @Sendable
209 | 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.
210 | return .valid
211 | }
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:214:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
212 |
213 | @Sendable
214 | 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.
215 | guard let response = result.1 as? HTTPURLResponse else {
216 | 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:215:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
216 | throw AuthenticatorError.httpResponseExpected
217 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:215:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | 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.
216 | throw AuthenticatorError.httpResponseExpected
217 | }
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:220:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
218 |
219 | // FIXME: This isn't really to spec: 401 doesn't mean "refresh", it just means unauthorized.
220 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
221 | return .refresh
222 | }
[9/23] Compiling OAuthenticator OAuthTypes.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:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:179:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
178 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
179 | 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.
180 |
181 | 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:209:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 |
208 | @Sendable
209 | 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.
210 | return .valid
211 | }
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:214:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
212 |
213 | @Sendable
214 | 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.
215 | guard let response = result.1 as? HTTPURLResponse else {
216 | 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:215:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
216 | throw AuthenticatorError.httpResponseExpected
217 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:215:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | 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.
216 | throw AuthenticatorError.httpResponseExpected
217 | }
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:220:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
218 |
219 | // FIXME: This isn't really to spec: 401 doesn't mean "refresh", it just means unauthorized.
220 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
221 | return .refresh
222 | }
[10/23] 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/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:179:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
178 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
179 | 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.
180 |
181 | 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:209:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 |
208 | @Sendable
209 | 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.
210 | return .valid
211 | }
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:214:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
212 |
213 | @Sendable
214 | 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.
215 | guard let response = result.1 as? HTTPURLResponse else {
216 | 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:215:33: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | guard let response = result.1 as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
216 | throw AuthenticatorError.httpResponseExpected
217 | }
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:215:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | @Sendable
214 | public static func refreshOrAuthorizeWhenUnauthorized(result: (Data, URLResponse)) throws -> ResponseStatus {
215 | 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.
216 | throw AuthenticatorError.httpResponseExpected
217 | }
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:220:15: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
218 |
219 | // FIXME: This isn't really to spec: 401 doesn't mean "refresh", it just means unauthorized.
220 | if response.statusCode == 401 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
221 | return .refresh
222 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/23] Emitting module OAuthenticator
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:80:13: error: type 'DPoPError' does not conform to protocol 'Equatable'
78 | }
79 |
80 | public enum DPoPError: Error, Equatable {
| |- error: type 'DPoPError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- note: associated value type '<<error type>>' does not conform to protocol 'Equatable', preventing synthesized conformance of 'DPoPError' to 'Equatable'
83 | }
84 |
Swift.==:1:24: note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'DPoPError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'DPoPError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'DPoPError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'DPoPError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'DPoPError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'DPoPError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'DPoPError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'DPoPError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(DPoPError, DPoPError) -> Bool'
3 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:103:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 |
102 | // Return value is (origin, nonce)
103 | public typealias NonceDecoder = (Data, HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | private let nonceCache: NSCache<NSString, NonceValue> = NSCache()
105 | private let nonceDecoder: NonceDecoder
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/DPoPSigner.swift:107:62: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | private let nonceDecoder: NonceDecoder
106 |
107 | public static func nonceHeaderDecoder(data: Data, response: HTTPURLResponse) throws -> NonceValue?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | {
109 | guard let value = response.value(forHTTPHeaderField: "DPoP-Nonce") else {
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/DPoPSigner.swift:139:14: error: cannot find type 'URLRequest' in scope
137 | extension DPoPSigner {
138 | private func makeRequest(
139 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
140 | isolation: isolated (any Actor),
141 | responseProvider: URLResponseProvider
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:143:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | responseProvider: URLResponseProvider
142 | )
143 | async throws -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 | {
145 | let (data, urlResponse) = try await responseProvider(request)
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/DPoPSigner.swift:160:20: error: cannot find type 'URLRequest' in scope
158 | token: String?,
159 | tokenHash: String?
160 | ) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
161 | guard
162 | let method = request.httpMethod,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:154:14: error: cannot find type 'URLRequest' in scope
152 |
153 | public func buildProof(
154 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
155 | isolation: isolated (any Actor),
156 | using jwtGenerator: JWTGenerator,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:206:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 | isAuthServer: Bool?,
205 | responseProvider: URLResponseProvider
206 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | // FIXME: calculate tokenHash using the value from the request Authorization
208 | // header:
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/DPoPSigner.swift:282:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 | // The logic here is taken from:
281 | // https://github.com/bluesky-social/atproto/blob/4e96e2c7/packages/oauth/oauth-client/src/fetch-dpop.ts#L195
282 | private func isUseDpopError(data: Data, response: HTTPURLResponse, isAuthServer: Bool?) -> Bool {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 | print(
284 | "isAuthServer: " + (isAuthServer == nil ? "nil" : (isAuthServer == true ? "true" : "false")))
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:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:179:62: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 | public typealias LoginProvider = @Sendable (LoginProviderParameters) async throws -> Login
178 | public typealias RefreshProvider = @Sendable (Login, AppCredentials, URLResponseProvider) async throws -> Login
179 | 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.
180 |
181 | 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:209:54: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 |
208 | @Sendable
209 | 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.
210 | return .valid
211 | }
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:214:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
212 |
213 | @Sendable
214 | 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.
215 | guard let response = result.1 as? HTTPURLResponse else {
216 | 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:99: 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 {
[12/23] Compiling OAuthenticator ASWebAuthenticationSession+Utility.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:315:68: error: 'nil' requires a contextual type
313 | parRequestURI: parRequestURI,
314 | stateToken: stateToken,
315 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
| `- error: 'nil' requires a contextual type
316 | )
317 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:328:68: error: 'nil' requires a contextual type
326 | credentials: config.appCredentials,
327 | redirectURL: callbackURL,
328 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
| `- error: 'nil' requires a contextual type
329 | stateToken: stateToken,
330 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:357:50: error: 'nil' requires a contextual type
355 | login, config.appCredentials,
356 | {
357 | try await self.dpopResponse(for: $0, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
358 | })
359 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:380:17: error: cannot find 'URLRequest' in scope
378 | let clientId = config.appCredentials.clientId
379 |
380 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
381 | request.httpMethod = "POST"
382 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:402:75: error: 'nil' requires a contextual type
400 | request.httpBody = Data(body.utf8)
401 |
402 | let (data, response) = try await self.dpopResponse(for: request, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
403 |
404 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
[13/23] Compiling OAuthenticator Authenticator.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:315:68: error: 'nil' requires a contextual type
313 | parRequestURI: parRequestURI,
314 | stateToken: stateToken,
315 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
| `- error: 'nil' requires a contextual type
316 | )
317 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:328:68: error: 'nil' requires a contextual type
326 | credentials: config.appCredentials,
327 | redirectURL: callbackURL,
328 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
| `- error: 'nil' requires a contextual type
329 | stateToken: stateToken,
330 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:357:50: error: 'nil' requires a contextual type
355 | login, config.appCredentials,
356 | {
357 | try await self.dpopResponse(for: $0, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
358 | })
359 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:380:17: error: cannot find 'URLRequest' in scope
378 | let clientId = config.appCredentials.clientId
379 |
380 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
381 | request.httpMethod = "POST"
382 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:402:75: error: 'nil' requires a contextual type
400 | request.httpBody = Data(body.utf8)
401 |
402 | let (data, response) = try await self.dpopResponse(for: request, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
403 |
404 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
[14/23] Compiling OAuthenticator CredentialWindowProvider.swift
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:32:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | }
34 |
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/Authenticator.swift:32:7: error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- error: associated value 'rateLimited' of 'Sendable'-conforming enum 'AuthenticatorError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| `- error: type 'AuthenticatorError' does not conform to protocol 'Hashable'
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Hashable', preventing synthesized conformance of 'AuthenticatorError' to 'Hashable'
33 | }
34 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:9:13: error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
7 | #endif
8 |
9 | public enum AuthenticatorError: Error, Hashable {
| |- error: type 'AuthenticatorError' does not conform to protocol 'Equatable'
| `- note: add stubs for conformance
10 | case missingScheme
11 | case missingAuthorizationCode
:
30 | case issuingServerMismatch(String, String)
31 | case pkceRequired
32 | case rateLimited(HTTPURLResponse)
| `- note: associated value type 'HTTPURLResponse' (aka 'AnyObject') does not conform to protocol 'Equatable', preventing synthesized conformance of 'AuthenticatorError' to 'Equatable'
33 | }
34 |
Swift.==:1:24: note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
1 | @inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
| `- note: candidate would match if 'AuthenticatorError' conformed to 'RawRepresentable'
Swift.FloatingPoint.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
1 | protocol FloatingPoint {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'FloatingPoint'
3 |
Swift.BinaryInteger.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
1 | protocol BinaryInteger {
2 | public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'BinaryInteger'
3 |
Swift._Pointer.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift._Pointer.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
1 | protocol _Pointer {
2 | @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_Pointer'
3 |
Swift.Strideable.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
1 | protocol Strideable {
2 | @inlinable public static func == (x: Self, y: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'Strideable'
3 |
Swift.StringProtocol.==:2:31: note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
1 | protocol StringProtocol {
2 | @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'StringProtocol'
3 |
Swift.SIMD.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
1 | protocol SIMD {
2 | public static func == (a: Self, b: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'SIMD'
3 |
Foundation.__BridgedNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
1 | protocol __BridgedNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '__BridgedNSError'
3 |
Foundation._BridgedStoredNSError.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
1 | protocol _BridgedStoredNSError {
2 | public static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: candidate would match if 'AuthenticatorError' conformed to '_BridgedStoredNSError'
3 |
FoundationEssentials.AttributedStringProtocol.==:2:20: note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
1 | protocol AttributedStringProtocol {
2 | public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : AttributedStringProtocol}
| `- note: candidate would match if 'AuthenticatorError' conformed to 'AttributedStringProtocol'
3 |
Swift.Equatable.==:2:13: note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
1 | protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool}
| `- note: protocol requires function '==' with type '(AuthenticatorError, AuthenticatorError) -> Bool'
3 |
/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:146:36: error: cannot find type 'URLRequest' in scope
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | public func response(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
147 | let userAuthenticator = config.userAuthenticator
148 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:146:71: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |
145 | /// Add authentication for `request`, execute it, and return its result.
146 | 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.
147 | let userAuthenticator = config.userAuthenticator
148 |
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:187:43: error: cannot find type 'URLRequest' in scope
185 | }
186 |
187 | private func authedResponse(for request: URLRequest, login: Login) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
188 | var authedRequest = request
189 | let token = login.accessToken.value
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:187:92: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | }
186 |
187 | 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.
188 | var authedRequest = request
189 | 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:448:41: error: cannot find type 'URLRequest' in scope
446 | }
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
| `- error: cannot find type 'URLRequest' in scope
449 | Data, URLResponse
450 | ) {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:449:9: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |
448 | private func dpopResponse(for request: URLRequest, login: Login?) async throws -> (
449 | Data, URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 | ) {
451 | var issuer: String? = nil
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:469:41: error: cannot find type 'URLRequest' in scope
467 | }
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
| `- error: cannot find type 'URLRequest' in scope
470 | async throws -> (Data, URLResponse)
471 | {
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:470:26: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 |
469 | private func dpopResponse(for request: URLRequest, login: Login?, isAuthServer: Bool?)
470 | async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
471 | {
472 | print("Request: \(request.httpMethod!) - \(request.url?.absoluteString ?? "missing url")")
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:133:41: error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
131 | self.config = config
132 |
133 | self.urlLoader = loader ?? URLSession.defaultProvider
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'defaultProvider'
134 | }
135 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:315:68: error: 'nil' requires a contextual type
313 | parRequestURI: parRequestURI,
314 | stateToken: stateToken,
315 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
| `- error: 'nil' requires a contextual type
316 | )
317 |
/host/spi-builder-workspace/Sources/OAuthenticator/Models.swift:155:22: error: @escaping attribute only applies to function types
153 | credentials: AppCredentials,
154 | redirectURL: URL,
155 | responseProvider: @escaping URLResponseProvider,
| `- error: @escaping attribute only applies to function types
156 | stateToken: String,
157 | pcke: PKCEVerifier?
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:328:68: error: 'nil' requires a contextual type
326 | credentials: config.appCredentials,
327 | redirectURL: callbackURL,
328 | responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
| `- error: 'nil' requires a contextual type
329 | stateToken: stateToken,
330 | pcke: config.tokenHandling.pkce
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:357:50: error: 'nil' requires a contextual type
355 | login, config.appCredentials,
356 | {
357 | try await self.dpopResponse(for: $0, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
358 | })
359 |
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:380:17: error: cannot find 'URLRequest' in scope
378 | let clientId = config.appCredentials.clientId
379 |
380 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
381 | request.httpMethod = "POST"
382 | request.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/OAuthenticator/Authenticator.swift:402:75: error: 'nil' requires a contextual type
400 | request.httpBody = Data(body.utf8)
401 |
402 | let (data, response) = try await self.dpopResponse(for: request, login: nil, isAuthServer: true)
| `- error: 'nil' requires a contextual type
403 |
404 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:82:22: error: cannot find type 'URLRequest' in scope
80 | public enum DPoPError: Error, Equatable {
81 | case urlResponseToHttpUrlResponseConversionFailed
82 | case requestInvalid(URLRequest)
| `- error: cannot find type 'URLRequest' in scope
83 | }
84 |
/host/spi-builder-workspace/Sources/OAuthenticator/DPoPSigner.swift:198:16: error: cannot find type 'URLRequest' in scope
196 | public func response(
197 | isolation: isolated (any Actor),
198 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
199 | using jwtGenerator: JWTGenerator,
200 | token: String?,
[15/23] Compiling OAuthenticator URL+TargetURI.swift
[16/23] Compiling OAuthenticator URLHelpers.swift
[17/23] 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.
[18/23] 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.
[19/23] 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:206:17: error: cannot find 'URLRequest' in scope
204 | }
205 |
206 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
207 |
208 | request.httpMethod = "POST"
/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/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:99: 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:17: 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")
[20/23] Compiling OAuthenticator GitHub.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:206:17: error: cannot find 'URLRequest' in scope
204 | }
205 |
206 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
207 |
208 | request.httpMethod = "POST"
/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/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:99: 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:17: 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")
[21/23] Compiling OAuthenticator GoogleAPI.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:206:17: error: cannot find 'URLRequest' in scope
204 | }
205 |
206 | var request = URLRequest(url: tokenURL)
| `- error: cannot find 'URLRequest' in scope
207 |
208 | request.httpMethod = "POST"
/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/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:99: 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:17: 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")
[22/23] 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:57:17: error: cannot find 'URLRequest' in scope
55 | }
56 |
57 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
58 | request.setValue("application/json", forHTTPHeaderField: "Accept")
59 |
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:87:17: error: cannot find 'URLRequest' in scope
85 | }
86 |
87 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
88 | request.setValue("application/json", forHTTPHeaderField: "Accept")
89 |
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:157:17: error: cannot find 'URLRequest' in scope
155 | }
156 |
157 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
158 | request.setValue("application/json", forHTTPHeaderField: "Accept")
159 |
[23/23] 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:57:17: error: cannot find 'URLRequest' in scope
55 | }
56 |
57 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
58 | request.setValue("application/json", forHTTPHeaderField: "Accept")
59 |
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:87:17: error: cannot find 'URLRequest' in scope
85 | }
86 |
87 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
88 | request.setValue("application/json", forHTTPHeaderField: "Accept")
89 |
/host/spi-builder-workspace/Sources/OAuthenticator/WellknownEndpoints.swift:157:17: error: cannot find 'URLRequest' in scope
155 | }
156 |
157 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
158 | request.setValue("application/json", forHTTPHeaderField: "Accept")
159 |
BUILD FAILURE 6.1 wasm