Skip to content

Commit ea0f449

Browse files
authored
[RC] SDK update to f127176 (#1942)
1 parent 03bf345 commit ea0f449

File tree

13 files changed

+52
-26
lines changed

13 files changed

+52
-26
lines changed

AuthenticatorShared/Core/Auth/Services/TestHelpers/BitwardenSdk+AuthFixtures.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ extension BitwardenSdk.Fido2CredentialAutofillView {
142142
cipherId: String = "1",
143143
rpId: String = defaultRpId,
144144
userNameForUi: String? = nil,
145-
userHandle: Data = Data(capacity: 64)
145+
userHandle: Data = Data(capacity: 64),
146+
hasCounter: Bool = false
146147
) -> BitwardenSdk.Fido2CredentialAutofillView {
147148
.init(
148149
credentialId: credentialId,
149150
cipherId: cipherId,
150151
rpId: rpId,
151152
userNameForUi: userNameForUi,
152-
userHandle: userHandle
153+
userHandle: userHandle,
154+
hasCounter: hasCounter
153155
)
154156
}
155157
}

AuthenticatorShared/Core/Auth/Services/TestHelpers/MockStateClient.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ import BitwardenSdk
33
@testable import AuthenticatorShared
44

55
final class MockStateClient: StateClientProtocol {
6-
var registerCipherRepositoryReceivedStore: CipherRepository?
6+
var registerCipherRepositoryReceivedRepository: CipherRepository?
7+
var state: SqliteConfiguration?
78

8-
func registerCipherRepository(store: CipherRepository) {
9-
registerCipherRepositoryReceivedStore = store
9+
func initializeState(configuration: SqliteConfiguration) async throws {
10+
state = configuration
11+
}
12+
13+
func registerCipherRepository(repository: CipherRepository) {
14+
registerCipherRepositoryReceivedRepository = repository
1015
}
1116
}

AuthenticatorShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,16 @@ extension BitwardenSdk.Fido2CredentialAutofillView {
373373
cipherId: String = "1",
374374
rpId: String = "myApp.com",
375375
userNameForUi: String? = nil,
376-
userHandle: Data = Data(capacity: 64)
376+
userHandle: Data = Data(capacity: 64),
377+
hasCounter: Bool = false
377378
) -> BitwardenSdk.Fido2CredentialAutofillView {
378379
.init(
379380
credentialId: credentialId,
380381
cipherId: cipherId,
381382
rpId: rpId,
382383
userNameForUi: userNameForUi,
383-
userHandle: userHandle
384+
userHandle: userHandle,
385+
hasCounter: hasCounter
384386
)
385387
}
386388
}

Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BitwardenShared/Core/Auth/Services/TestHelpers/BitwardenSdk+AuthFixtures.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ extension BitwardenSdk.Fido2CredentialAutofillView {
142142
cipherId: String = "1",
143143
rpId: String = defaultRpId,
144144
userNameForUi: String? = nil,
145-
userHandle: Data = Data(capacity: 64)
145+
userHandle: Data = Data(capacity: 64),
146+
hasCounter: Bool = false
146147
) -> BitwardenSdk.Fido2CredentialAutofillView {
147148
.init(
148149
credentialId: credentialId,
149150
cipherId: cipherId,
150151
rpId: rpId,
151152
userNameForUi: userNameForUi,
152-
userHandle: userHandle
153+
userHandle: userHandle,
154+
hasCounter: hasCounter
153155
)
154156
}
155157
}

BitwardenShared/Core/Auth/Services/TestHelpers/MockStateClient.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ import BitwardenSdk
33
@testable import BitwardenShared
44

55
final class MockStateClient: StateClientProtocol {
6-
var registerCipherRepositoryReceivedStore: CipherRepository?
6+
var registerCipherRepositoryReceivedRepository: CipherRepository?
7+
var state: SqliteConfiguration?
78

8-
func registerCipherRepository(store: CipherRepository) {
9-
registerCipherRepositoryReceivedStore = store
9+
func initializeState(configuration: SqliteConfiguration) async throws {
10+
state = configuration
11+
}
12+
13+
func registerCipherRepository(repository: CipherRepository) {
14+
registerCipherRepositoryReceivedRepository = repository
1015
}
1116
}

BitwardenShared/Core/Autofill/Models/Fido2CredentialAutofillViewExtensionsTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class Fido2CredentialAutofillViewExtensionsTests: BitwardenTestCase {
1414
cipherId: "1",
1515
rpId: "myApp.com",
1616
userNameForUi: "username",
17-
userHandle: Data(repeating: 1, count: 16)
17+
userHandle: Data(repeating: 1, count: 16),
18+
hasCounter: false
1819
)
1920
let identity = subject.toFido2CredentialIdentity()
2021
XCTAssertTrue(
@@ -34,7 +35,8 @@ class Fido2CredentialAutofillViewExtensionsTests: BitwardenTestCase {
3435
cipherId: "1",
3536
rpId: "myApp.com",
3637
userNameForUi: nil,
37-
userHandle: Data(repeating: 1, count: 16)
38+
userHandle: Data(repeating: 1, count: 16),
39+
hasCounter: false
3840
)
3941
let identity = subject.toFido2CredentialIdentity()
4042
XCTAssertTrue(

BitwardenShared/Core/Autofill/Services/AutofillCredentialServiceTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,8 @@ class AutofillCredentialServiceTests: BitwardenTestCase { // swiftlint:disable:t
959959
cipherId: "3",
960960
rpId: "myApp.com",
961961
userNameForUi: "MyUser",
962-
userHandle: Data(repeating: 3, count: 45)
962+
userHandle: Data(repeating: 3, count: 45),
963+
hasCounter: false
963964
),
964965
]
965966
)
@@ -1052,7 +1053,8 @@ class AutofillCredentialServiceTests: BitwardenTestCase { // swiftlint:disable:t
10521053
cipherId: "3",
10531054
rpId: "myApp.com",
10541055
userNameForUi: "MyUser",
1055-
userHandle: Data(repeating: 3, count: 45)
1056+
userHandle: Data(repeating: 3, count: 45),
1057+
hasCounter: false
10561058
),
10571059
]
10581060
)

BitwardenShared/Core/Platform/Services/ClientService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ actor DefaultClientService: ClientService {
286286
/// - userId: The user ID the SDK client instance belongs to.
287287
func configureNewClient(_ client: BitwardenSdkClient, for userId: String) async {
288288
client.platform().state().registerCipherRepository(
289-
store: sdkRepositoryFactory.makeCipherRepository(userId: userId)
289+
repository: sdkRepositoryFactory.makeCipherRepository(userId: userId)
290290
)
291291

292292
// Get the current config and load the flags.

BitwardenShared/Core/Platform/Services/ClientServiceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ final class ClientServiceTests: BitwardenTestCase { // swiftlint:disable:this ty
228228
let client = try XCTUnwrap(clientBuilder.clients.first)
229229
XCTAssertIdentical(auth, client.authClient)
230230
XCTAssertTrue(sdkRepositoryFactory.makeCipherRepositoryCalled)
231-
XCTAssertNotNil(client.platformClient.stateMock.registerCipherRepositoryReceivedStore)
231+
XCTAssertNotNil(client.platformClient.stateMock.registerCipherRepositoryReceivedRepository)
232232
}
233233

234234
/// `configPublisher` loads flags into the SDK.

0 commit comments

Comments
 (0)