Skip to content

Commit 67cb387

Browse files
committed
wip re. swift-authenticating upgrade
1 parent 98eb017 commit 67cb387

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Sources/Authenticating/Authenticating.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import Dependencies
3030
/// // Access the router for URL generation
3131
/// let url = mailgun.router.url(for: .getMessage(id: "123"))
3232
/// ```
33+
@dynamicMemberLookup
3334
public struct Authenticating<
3435
Auth: Equatable & Sendable,
3536
AuthRouter: ParserPrinter & Sendable,
@@ -43,7 +44,7 @@ public struct Authenticating<
4344
AuthRouter.Output == Auth
4445
{
4546
/// The authenticated client for making API requests
46-
public let client: Client
47+
public let client: ClientOutput
4748

4849
/// The router for URL generation and request building
4950
public let router: Router
@@ -69,14 +70,18 @@ public struct Authenticating<
6970
router: apiRouter,
7071
authRouter: authRouter,
7172
buildClient: buildClient
72-
)
73+
).client
7374

7475
self.router = Router(
7576
baseURL: baseURL,
7677
authRouter: authRouter,
7778
router: apiRouter
7879
)
7980
}
81+
82+
public subscript<T>(dynamicMember keyPath: KeyPath<ClientOutput, T>) -> T {
83+
self.client[keyPath: keyPath]
84+
}
8085
}
8186

8287
// MARK: - Bearer Authentication Conveniences

0 commit comments

Comments
 (0)