Skip to content

Commit f7cbcd2

Browse files
authored
Expand supported credential types for import (#6030)
1 parent 188ddf9 commit f7cbcd2

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/CredentialExchangeRegistryManagerImpl.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ class CredentialExchangeRegistryManagerImpl(
2424
credentialTypes = setOf(
2525
CredentialTypes.CREDENTIAL_TYPE_BASIC_AUTH,
2626
CredentialTypes.CREDENTIAL_TYPE_PUBLIC_KEY,
27-
CredentialTypes.CREDENTIAL_TYPE_TOTP,
27+
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
28+
CredentialTypes.CREDENTIAL_TYPE_API_KEY,
2829
CredentialTypes.CREDENTIAL_TYPE_CREDIT_CARD,
30+
CredentialTypes.CREDENTIAL_TYPE_CUSTOM_FIELDS,
31+
CredentialTypes.CREDENTIAL_TYPE_DRIVERS_LICENSE,
32+
CredentialTypes.CREDENTIAL_TYPE_IDENTITY_DOCUMENT,
33+
CredentialTypes.CREDENTIAL_TYPE_NOTE,
34+
CredentialTypes.CREDENTIAL_TYPE_PASSPORT,
35+
CredentialTypes.CREDENTIAL_TYPE_PERSON_NAME,
2936
CredentialTypes.CREDENTIAL_TYPE_SSH_KEY,
30-
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
37+
CredentialTypes.CREDENTIAL_TYPE_TOTP,
38+
CredentialTypes.CREDENTIAL_TYPE_WIFI,
3139
),
3240
iconResId = BitwardenDrawable.icon,
3341
),

app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModel.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,18 @@ class ImportItemsViewModel @Inject constructor(
122122
credentialTypes = listOf(
123123
CredentialTypes.CREDENTIAL_TYPE_BASIC_AUTH,
124124
CredentialTypes.CREDENTIAL_TYPE_PUBLIC_KEY,
125-
CredentialTypes.CREDENTIAL_TYPE_TOTP,
125+
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
126+
CredentialTypes.CREDENTIAL_TYPE_API_KEY,
126127
CredentialTypes.CREDENTIAL_TYPE_CREDIT_CARD,
128+
CredentialTypes.CREDENTIAL_TYPE_CUSTOM_FIELDS,
129+
CredentialTypes.CREDENTIAL_TYPE_DRIVERS_LICENSE,
130+
CredentialTypes.CREDENTIAL_TYPE_IDENTITY_DOCUMENT,
131+
CredentialTypes.CREDENTIAL_TYPE_NOTE,
132+
CredentialTypes.CREDENTIAL_TYPE_PASSPORT,
133+
CredentialTypes.CREDENTIAL_TYPE_PERSON_NAME,
127134
CredentialTypes.CREDENTIAL_TYPE_SSH_KEY,
128-
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
135+
CredentialTypes.CREDENTIAL_TYPE_TOTP,
136+
CredentialTypes.CREDENTIAL_TYPE_WIFI,
129137
),
130138
),
131139
)

app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/CredentialExchangeRegistryManagerImplTest.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@ class CredentialExchangeRegistryManagerImplTest {
5454
credentialTypes = setOf(
5555
CredentialTypes.CREDENTIAL_TYPE_BASIC_AUTH,
5656
CredentialTypes.CREDENTIAL_TYPE_PUBLIC_KEY,
57-
CredentialTypes.CREDENTIAL_TYPE_TOTP,
57+
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
58+
CredentialTypes.CREDENTIAL_TYPE_API_KEY,
5859
CredentialTypes.CREDENTIAL_TYPE_CREDIT_CARD,
60+
CredentialTypes.CREDENTIAL_TYPE_CUSTOM_FIELDS,
61+
CredentialTypes.CREDENTIAL_TYPE_DRIVERS_LICENSE,
62+
CredentialTypes.CREDENTIAL_TYPE_IDENTITY_DOCUMENT,
63+
CredentialTypes.CREDENTIAL_TYPE_NOTE,
64+
CredentialTypes.CREDENTIAL_TYPE_PASSPORT,
65+
CredentialTypes.CREDENTIAL_TYPE_PERSON_NAME,
5966
CredentialTypes.CREDENTIAL_TYPE_SSH_KEY,
60-
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
67+
CredentialTypes.CREDENTIAL_TYPE_TOTP,
68+
CredentialTypes.CREDENTIAL_TYPE_WIFI,
6169
),
6270
iconResId = BitwardenDrawable.icon,
6371
),

app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,18 @@ class ImportItemsViewModelTest : BaseViewModelTest() {
6363
listOf(
6464
CredentialTypes.CREDENTIAL_TYPE_BASIC_AUTH,
6565
CredentialTypes.CREDENTIAL_TYPE_PUBLIC_KEY,
66-
CredentialTypes.CREDENTIAL_TYPE_TOTP,
66+
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
67+
CredentialTypes.CREDENTIAL_TYPE_API_KEY,
6768
CredentialTypes.CREDENTIAL_TYPE_CREDIT_CARD,
69+
CredentialTypes.CREDENTIAL_TYPE_CUSTOM_FIELDS,
70+
CredentialTypes.CREDENTIAL_TYPE_DRIVERS_LICENSE,
71+
CredentialTypes.CREDENTIAL_TYPE_IDENTITY_DOCUMENT,
72+
CredentialTypes.CREDENTIAL_TYPE_NOTE,
73+
CredentialTypes.CREDENTIAL_TYPE_PASSPORT,
74+
CredentialTypes.CREDENTIAL_TYPE_PERSON_NAME,
6875
CredentialTypes.CREDENTIAL_TYPE_SSH_KEY,
69-
CredentialTypes.CREDENTIAL_TYPE_ADDRESS,
76+
CredentialTypes.CREDENTIAL_TYPE_TOTP,
77+
CredentialTypes.CREDENTIAL_TYPE_WIFI,
7078
),
7179
),
7280
awaitItem(),

0 commit comments

Comments
 (0)