Skip to content

Commit

Permalink
Update to the latest Bitwarden SDK (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-livefront authored Jul 8, 2024
1 parent 99c50a3 commit 01b786f
Show file tree
Hide file tree
Showing 24 changed files with 64 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.x8bit.bitwarden.data.auth.datasource.sdk

import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.bitwarden.MasterPasswordPolicyOptions
import com.bitwarden.bitwarden.RegisterKeyResponse
import com.bitwarden.bitwarden.RegisterTdeKeyResponse
import com.bitwarden.core.AuthRequestResponse
import com.bitwarden.core.MasterPasswordPolicyOptions
import com.bitwarden.core.RegisterKeyResponse
import com.bitwarden.core.RegisterTdeKeyResponse
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.x8bit.bitwarden.data.auth.datasource.sdk.model.PasswordStrength
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.x8bit.bitwarden.data.auth.datasource.sdk

import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.bitwarden.FingerprintRequest
import com.bitwarden.bitwarden.MasterPasswordPolicyOptions
import com.bitwarden.bitwarden.RegisterKeyResponse
import com.bitwarden.bitwarden.RegisterTdeKeyResponse
import com.bitwarden.core.AuthRequestResponse
import com.bitwarden.core.FingerprintRequest
import com.bitwarden.core.MasterPasswordPolicyOptions
import com.bitwarden.core.RegisterKeyResponse
import com.bitwarden.core.RegisterTdeKeyResponse
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.bitwarden.sdk.Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.x8bit.bitwarden.data.auth.manager

import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.core.AuthRequestResponse
import com.x8bit.bitwarden.data.auth.datasource.disk.AuthDiskSource
import com.x8bit.bitwarden.data.auth.datasource.disk.model.PendingAuthRequestJson
import com.x8bit.bitwarden.data.auth.datasource.network.model.AuthRequestTypeJson
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.x8bit.bitwarden.data.auth.manager.model

import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.core.AuthRequestResponse

/**
* Models result of creating a new login approval request.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.x8bit.bitwarden.data.auth.repository

import android.os.SystemClock
import com.bitwarden.bitwarden.AuthRequestMethod
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.core.AuthRequestMethod
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.x8bit.bitwarden.data.auth.datasource.disk.AuthDiskSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.x8bit.bitwarden.data.vault.datasource.sdk

import com.bitwarden.bitwarden.DerivePinKeyResponse
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.bitwarden.InitUserCryptoRequest
import com.bitwarden.bitwarden.UpdatePasswordResponse
import com.bitwarden.core.DateTime
import com.bitwarden.core.DerivePinKeyResponse
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.core.InitUserCryptoRequest
import com.bitwarden.core.UpdatePasswordResponse
import com.bitwarden.crypto.TrustDeviceResponse
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.fido.CheckUserOptions
import com.bitwarden.fido.ClientData
import com.bitwarden.fido.Fido2CredentialAutofillView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.x8bit.bitwarden.data.vault.datasource.sdk

import com.bitwarden.bitwarden.DerivePinKeyResponse
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoRequest
import com.bitwarden.bitwarden.UpdatePasswordResponse
import com.bitwarden.core.DateTime
import com.bitwarden.core.DerivePinKeyResponse
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoRequest
import com.bitwarden.core.UpdatePasswordResponse
import com.bitwarden.crypto.TrustDeviceResponse
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.fido.CheckUserOptions
import com.bitwarden.fido.ClientData
import com.bitwarden.fido.Fido2CredentialAutofillView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.x8bit.bitwarden.data.vault.datasource.sdk.model

import com.bitwarden.fido.CheckUserOptions
import com.bitwarden.sdk.CheckUserAndPickCredentialForCreationResult
import com.bitwarden.sdk.CheckUserResult
import com.bitwarden.sdk.CipherViewWrapper
import com.bitwarden.sdk.Fido2UserInterface
Expand All @@ -26,7 +27,7 @@ class Fido2CredentialAuthenticationUserInterfaceImpl(
override suspend fun checkUserAndPickCredentialForCreation(
options: CheckUserOptions,
newCredential: Fido2CredentialNewView,
): CipherViewWrapper = throw IllegalStateException()
): CheckUserAndPickCredentialForCreationResult = throw IllegalStateException()

override suspend fun isVerificationEnabled(): Boolean = isVerificationSupported

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.x8bit.bitwarden.data.vault.datasource.sdk.model

import com.bitwarden.fido.CheckUserOptions
import com.bitwarden.sdk.CheckUserAndPickCredentialForCreationResult
import com.bitwarden.sdk.CheckUserResult
import com.bitwarden.sdk.CipherViewWrapper
import com.bitwarden.sdk.Fido2UserInterface
Expand Down Expand Up @@ -30,7 +31,7 @@ class Fido2CredentialRegistrationUserInterfaceImpl(
override suspend fun checkUserAndPickCredentialForCreation(
options: CheckUserOptions,
newCredential: Fido2CredentialNewView,
): CipherViewWrapper = checkUserAndPickCredentialForCreation.invoke(options, newCredential)
): CheckUserAndPickCredentialForCreationResult = throw IllegalStateException()

override suspend fun isVerificationEnabled(): Boolean = isVerificationSupported

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.x8bit.bitwarden.data.vault.manager

import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.crypto.Kdf
import com.bitwarden.sdk.ClientAuth
import com.x8bit.bitwarden.data.vault.manager.model.VaultStateEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.x8bit.bitwarden.data.vault.manager

import android.os.SystemClock
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.bitwarden.InitUserCryptoRequest
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.core.InitUserCryptoRequest
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.x8bit.bitwarden.data.auth.datasource.disk.AuthDiskSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.x8bit.bitwarden.data.vault.repository

import android.net.Uri
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.core.DateTime
import com.bitwarden.crypto.Kdf
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.send.SendType
import com.bitwarden.send.SendView
import com.bitwarden.vault.CipherView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.x8bit.bitwarden.data.vault.repository

import android.net.Uri
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.core.DateTime
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.crypto.Kdf
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.fido.Fido2CredentialAutofillView
import com.bitwarden.send.Send
import com.bitwarden.send.SendType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.x8bit.bitwarden.ui.platform.feature.settings.exportvault.model

import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.exporters.ExportFormat

/**
* Represents the file formats a user can select to export the vault.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.x8bit.bitwarden.data.auth.datasource.sdk

import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.bitwarden.FingerprintRequest
import com.bitwarden.bitwarden.MasterPasswordPolicyOptions
import com.bitwarden.bitwarden.RegisterKeyResponse
import com.bitwarden.bitwarden.RegisterTdeKeyResponse
import com.bitwarden.core.AuthRequestResponse
import com.bitwarden.core.FingerprintRequest
import com.bitwarden.core.MasterPasswordPolicyOptions
import com.bitwarden.core.RegisterKeyResponse
import com.bitwarden.core.RegisterTdeKeyResponse
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.bitwarden.sdk.Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.x8bit.bitwarden.data.auth.manager

import app.cash.turbine.test
import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.core.AuthRequestResponse
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountJson
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountTokensJson
import com.x8bit.bitwarden.data.auth.datasource.disk.model.PendingAuthRequestJson
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.x8bit.bitwarden.data.auth.repository

import app.cash.turbine.test
import com.bitwarden.bitwarden.AuthRequestMethod
import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.bitwarden.RegisterKeyResponse
import com.bitwarden.bitwarden.RegisterTdeKeyResponse
import com.bitwarden.bitwarden.UpdatePasswordResponse
import com.bitwarden.core.AuthRequestMethod
import com.bitwarden.core.AuthRequestResponse
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.core.RegisterKeyResponse
import com.bitwarden.core.RegisterTdeKeyResponse
import com.bitwarden.core.UpdatePasswordResponse
import com.bitwarden.crypto.HashPurpose
import com.bitwarden.crypto.Kdf
import com.bitwarden.crypto.RsaKeyPair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.x8bit.bitwarden.data.platform.repository

import android.view.autofill.AutofillManager
import app.cash.turbine.test
import com.bitwarden.bitwarden.DerivePinKeyResponse
import com.bitwarden.core.DerivePinKeyResponse
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountJson
import com.x8bit.bitwarden.data.auth.datasource.disk.model.EnvironmentUrlDataJson
import com.x8bit.bitwarden.data.auth.datasource.disk.model.UserStateJson
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.x8bit.bitwarden.data.vault.datasource.sdk

import com.bitwarden.bitwarden.DerivePinKeyResponse
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoRequest
import com.bitwarden.bitwarden.UpdatePasswordResponse
import com.bitwarden.core.DateTime
import com.bitwarden.core.DerivePinKeyResponse
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoRequest
import com.bitwarden.core.UpdatePasswordResponse
import com.bitwarden.crypto.TrustDeviceResponse
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.fido.CheckUserOptions
import com.bitwarden.fido.ClientData
import com.bitwarden.fido.PublicKeyCredentialAuthenticatorAssertionResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.x8bit.bitwarden.data.vault.manager

import app.cash.turbine.test
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.bitwarden.InitUserCryptoRequest
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.core.InitUserCryptoRequest
import com.bitwarden.crypto.HashPurpose
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountJson
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountTokensJson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import android.net.Uri
import android.util.Base64
import app.cash.turbine.test
import app.cash.turbine.turbineScope
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.bitwarden.InitOrgCryptoRequest
import com.bitwarden.bitwarden.InitUserCryptoMethod
import com.bitwarden.core.DateTime
import com.bitwarden.core.InitOrgCryptoRequest
import com.bitwarden.core.InitUserCryptoMethod
import com.bitwarden.exporters.ExportFormat
import com.bitwarden.send.SendType
import com.bitwarden.send.SendView
import com.bitwarden.vault.CipherView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.x8bit.bitwarden.ui.auth.feature.loginwithdevice

import androidx.lifecycle.SavedStateHandle
import app.cash.turbine.test
import com.bitwarden.bitwarden.AuthRequestResponse
import com.bitwarden.core.AuthRequestResponse
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.data.auth.manager.model.AuthRequest
import com.x8bit.bitwarden.data.auth.manager.model.AuthRequestType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.x8bit.bitwarden.ui.platform.feature.settings.exportvault
import android.net.Uri
import androidx.lifecycle.SavedStateHandle
import app.cash.turbine.test
import com.bitwarden.bitwarden.ExportFormat
import com.bitwarden.exporters.ExportFormat
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.data.auth.datasource.sdk.model.PasswordStrength
import com.x8bit.bitwarden.data.auth.repository.AuthRepository
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ androidxSplash = "1.1.0-rc01"
androidXAppCompat = "1.7.0"
androdixAutofill = "1.1.0"
androidxWork = "2.9.0"
bitwardenSdk = "0.5.0-20240618.092031-102"
bitwardenSdk = "0.5.0-20240708.194113-132"
crashlytics = "3.0.2"
detekt = "1.23.6"
firebaseBom = "33.1.1"
Expand Down

0 comments on commit 01b786f

Please sign in to comment.