mirror of
https://github.com/bitwarden/android.git
synced 2025-12-10 09:56:45 -06:00
Update SDK to 1.0.0-3175-c9758478 (#5922)
Co-authored-by: bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com> Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
This commit is contained in:
parent
89ad7818f9
commit
b558d70703
@ -9,16 +9,19 @@ import com.bitwarden.core.InitUserCryptoRequest
|
||||
import com.bitwarden.core.UpdatePasswordResponse
|
||||
import com.bitwarden.core.data.util.asFailure
|
||||
import com.bitwarden.core.data.util.asSuccess
|
||||
import com.bitwarden.crypto.CryptoException
|
||||
import com.bitwarden.crypto.Kdf
|
||||
import com.bitwarden.crypto.TrustDeviceResponse
|
||||
import com.bitwarden.data.datasource.disk.base.FakeDispatcherManager
|
||||
import com.bitwarden.exporters.Account
|
||||
import com.bitwarden.exporters.ExportFormat
|
||||
import com.bitwarden.fido.ClientData
|
||||
import com.bitwarden.fido.Fido2ClientException
|
||||
import com.bitwarden.fido.Fido2CredentialAutofillView
|
||||
import com.bitwarden.fido.Origin
|
||||
import com.bitwarden.fido.PublicKeyCredentialAuthenticatorAssertionResponse
|
||||
import com.bitwarden.fido.PublicKeyCredentialAuthenticatorAttestationResponse
|
||||
import com.bitwarden.fido.SilentlyDiscoverCredentialsException
|
||||
import com.bitwarden.fido.UnverifiedAssetLink
|
||||
import com.bitwarden.sdk.AuthClient
|
||||
import com.bitwarden.sdk.BitwardenException
|
||||
@ -41,6 +44,7 @@ import com.bitwarden.vault.AttachmentView
|
||||
import com.bitwarden.vault.Cipher
|
||||
import com.bitwarden.vault.CipherView
|
||||
import com.bitwarden.vault.DecryptCipherListResult
|
||||
import com.bitwarden.vault.DecryptException
|
||||
import com.bitwarden.vault.EncryptionContext
|
||||
import com.bitwarden.vault.Folder
|
||||
import com.bitwarden.vault.FolderView
|
||||
@ -499,7 +503,9 @@ class VaultSdkSourceTest {
|
||||
val userId = "userId"
|
||||
val mockInitCryptoRequest = mockk<InitUserCryptoRequest>()
|
||||
val expectedErrorMessage = "Whoopsy"
|
||||
val expectedException = BitwardenException.E(message = expectedErrorMessage)
|
||||
val expectedException = BitwardenException.Crypto(
|
||||
CryptoException.InvalidKey(expectedErrorMessage),
|
||||
)
|
||||
coEvery {
|
||||
clientCrypto.initializeUserCrypto(
|
||||
req = mockInitCryptoRequest,
|
||||
@ -512,7 +518,7 @@ class VaultSdkSourceTest {
|
||||
assertEquals(
|
||||
InitializeCryptoResult
|
||||
.AuthenticationError(
|
||||
message = expectedErrorMessage,
|
||||
message = expectedException.message,
|
||||
error = expectedException,
|
||||
)
|
||||
.asSuccess(),
|
||||
@ -585,7 +591,9 @@ class VaultSdkSourceTest {
|
||||
val userId = "userId"
|
||||
val mockInitCryptoRequest = mockk<InitOrgCryptoRequest>()
|
||||
val expectedErrorMessage = "Whoopsy2"
|
||||
val expectedException = BitwardenException.E(message = expectedErrorMessage)
|
||||
val expectedException = BitwardenException.Crypto(
|
||||
CryptoException.InvalidKey(expectedErrorMessage),
|
||||
)
|
||||
coEvery {
|
||||
clientCrypto.initializeOrgCrypto(
|
||||
req = mockInitCryptoRequest,
|
||||
@ -598,7 +606,7 @@ class VaultSdkSourceTest {
|
||||
assertEquals(
|
||||
InitializeCryptoResult
|
||||
.AuthenticationError(
|
||||
message = expectedErrorMessage,
|
||||
message = expectedException.message,
|
||||
error = expectedException,
|
||||
)
|
||||
.asSuccess(),
|
||||
@ -1230,7 +1238,7 @@ class VaultSdkSourceTest {
|
||||
any(),
|
||||
any(),
|
||||
)
|
||||
} throws BitwardenException.E("mockException")
|
||||
} throws BitwardenException.Fido2Client(mockk<Fido2ClientException>())
|
||||
|
||||
val result = vaultSdkSource.registerFido2Credential(
|
||||
DEFAULT_FIDO_2_REGISTER_CREDENTIAL_REQUEST,
|
||||
@ -1275,7 +1283,7 @@ class VaultSdkSourceTest {
|
||||
any(),
|
||||
any(),
|
||||
)
|
||||
} throws BitwardenException.E("mockException")
|
||||
} throws BitwardenException.Fido2Client(mockk<Fido2ClientException>("mockException"))
|
||||
|
||||
val result = vaultSdkSource
|
||||
.authenticateFido2Credential(
|
||||
@ -1321,7 +1329,7 @@ class VaultSdkSourceTest {
|
||||
val mockCipherView = createMockCipherView(number = 1)
|
||||
coEvery {
|
||||
clientFido2.decryptFido2AutofillCredentials(mockCipherView)
|
||||
} throws BitwardenException.E("mockException")
|
||||
} throws BitwardenException.Fido2Client(mockk<Fido2ClientException>("mockException"))
|
||||
|
||||
val result = vaultSdkSource.decryptFido2CredentialAutofillViews(
|
||||
userId = "mockUserId",
|
||||
@ -1382,7 +1390,9 @@ class VaultSdkSourceTest {
|
||||
credentialStore = fido2CredentialStore,
|
||||
)
|
||||
.silentlyDiscoverCredentials(relyingPartyId)
|
||||
} throws BitwardenException.E("mockException")
|
||||
} throws BitwardenException.SilentlyDiscoverCredentials(
|
||||
mockk<SilentlyDiscoverCredentialsException>("mockException"),
|
||||
)
|
||||
|
||||
val result = vaultSdkSource.silentlyDiscoverCredentials(
|
||||
userId = userId,
|
||||
@ -1422,7 +1432,7 @@ class VaultSdkSourceTest {
|
||||
clientVault.ciphers().decryptListWithFailures(
|
||||
ciphers = mockCipherList,
|
||||
)
|
||||
} throws BitwardenException.E("mockException")
|
||||
} throws BitwardenException.Decrypt(mockk<DecryptException>("mockException"))
|
||||
val result = vaultSdkSource.decryptCipherListWithFailures(
|
||||
userId = userId,
|
||||
cipherList = mockCipherList,
|
||||
|
||||
@ -30,7 +30,7 @@ androidxRoom = "2.8.0"
|
||||
androidxSecurityCrypto = "1.1.0"
|
||||
androidxSplash = "1.1.0-rc01"
|
||||
androidxWork = "2.10.4"
|
||||
bitwardenSdk = "1.0.0-3165-92bb5c30"
|
||||
bitwardenSdk = "1.0.0-3175-c9758478"
|
||||
crashlytics = "3.0.6"
|
||||
detekt = "1.23.8"
|
||||
firebaseBom = "34.2.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user