mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Update the SDK and build a client before logging in with a QR code. (#4320)
This commit is contained in:
@@ -11,9 +11,6 @@ import MatrixRustSDK
|
||||
// sourcery: AutoMockable
|
||||
protocol AuthenticationClientBuilderProtocol {
|
||||
func build(homeserverAddress: String) async throws -> ClientProtocol
|
||||
func buildWithQRCode(qrCodeData: QrCodeData,
|
||||
oidcConfiguration: OIDCConfigurationProxy,
|
||||
progressListener: SDKListener<QrLoginProgress>) async throws -> ClientProtocol
|
||||
}
|
||||
|
||||
/// A wrapper around `ClientBuilder` to share reusable code between Normal and QR logins.
|
||||
@@ -30,15 +27,6 @@ struct AuthenticationClientBuilder: AuthenticationClientBuilderProtocol {
|
||||
try await makeClientBuilder().serverNameOrHomeserverUrl(serverNameOrUrl: homeserverAddress).build()
|
||||
}
|
||||
|
||||
/// Builds a Client, authenticating with the given QR code data.
|
||||
func buildWithQRCode(qrCodeData: QrCodeData,
|
||||
oidcConfiguration: OIDCConfigurationProxy,
|
||||
progressListener: SDKListener<QrLoginProgress>) async throws -> ClientProtocol {
|
||||
try await makeClientBuilder().buildWithQrCode(qrCodeData: qrCodeData,
|
||||
oidcConfiguration: oidcConfiguration.rustValue,
|
||||
progressListener: progressListener)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
/// The base builder configuration used for authentication within the app.
|
||||
|
||||
Reference in New Issue
Block a user