mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 17:05:44 +03:00
Rename FIDO_2_WEB_APP enum to WEB_AUTH (#1292)
This commit is contained in:
parent
4293c0b9fd
commit
e6dfaeeab2
5 changed files with 10 additions and 10 deletions
|
@ -32,7 +32,7 @@ enum class TwoFactorAuthMethod(val value: UInt) {
|
|||
DUO_ORGANIZATION(value = 6U),
|
||||
|
||||
@SerialName("7")
|
||||
FIDO_2_WEB_APP(value = 7U),
|
||||
WEB_AUTH(value = 7U),
|
||||
|
||||
@SerialName("-1")
|
||||
RECOVERY_CODE(value = 100U),
|
||||
|
|
|
@ -14,6 +14,6 @@ val TwoFactorAuthMethod.priority: Int
|
|||
TwoFactorAuthMethod.DUO -> 2
|
||||
TwoFactorAuthMethod.YUBI_KEY -> 3
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION -> 20
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP -> 4
|
||||
TwoFactorAuthMethod.WEB_AUTH -> 4
|
||||
else -> -1
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ class TwoFactorLoginViewModel @Inject constructor(
|
|||
TwoFactorAuthMethod.U2F,
|
||||
TwoFactorAuthMethod.REMEMBER,
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP,
|
||||
TwoFactorAuthMethod.WEB_AUTH,
|
||||
-> {
|
||||
mutableStateFlow.update { it.copy(authMethod = action.authMethod) }
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ class TwoFactorLoginViewModel @Inject constructor(
|
|||
TwoFactorAuthMethod.YUBI_KEY,
|
||||
TwoFactorAuthMethod.U2F,
|
||||
TwoFactorAuthMethod.REMEMBER,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP,
|
||||
TwoFactorAuthMethod.WEB_AUTH,
|
||||
TwoFactorAuthMethod.RECOVERY_CODE,
|
||||
-> state.codeInput
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
TwoFactorAuthMethod.U2F to -1,
|
||||
TwoFactorAuthMethod.REMEMBER to -1,
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION to 20,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to 4,
|
||||
TwoFactorAuthMethod.WEB_AUTH to 4,
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to -1,
|
||||
)
|
||||
.forEach { (type, priority) ->
|
||||
|
|
|
@ -20,7 +20,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
TwoFactorAuthMethod.DUO_ORGANIZATION to R.string.duo_org_title.asText(
|
||||
R.string.organization.asText(),
|
||||
),
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to "".asText(),
|
||||
TwoFactorAuthMethod.WEB_AUTH to "".asText(),
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to R.string.recovery_code_title.asText(),
|
||||
)
|
||||
.forEach { (type, title) ->
|
||||
|
@ -48,7 +48,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
.asText()
|
||||
.concat(" ".asText())
|
||||
.concat(R.string.follow_the_steps_from_duo_to_finish_logging_in.asText()),
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to "".asText(),
|
||||
TwoFactorAuthMethod.WEB_AUTH to "".asText(),
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to "".asText(),
|
||||
)
|
||||
.forEach { (type, title) ->
|
||||
|
@ -69,7 +69,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
TwoFactorAuthMethod.U2F to false,
|
||||
TwoFactorAuthMethod.REMEMBER to false,
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION to true,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to false,
|
||||
TwoFactorAuthMethod.WEB_AUTH to false,
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to false,
|
||||
)
|
||||
.forEach { (type, isDuo) ->
|
||||
|
@ -87,7 +87,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
TwoFactorAuthMethod.U2F to false,
|
||||
TwoFactorAuthMethod.REMEMBER to false,
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION to false,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to false,
|
||||
TwoFactorAuthMethod.WEB_AUTH to false,
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to false,
|
||||
)
|
||||
.forEach { (type, shouldUseNfc) ->
|
||||
|
@ -105,7 +105,7 @@ class TwoFactorAuthMethodExtensionTest {
|
|||
TwoFactorAuthMethod.U2F to null,
|
||||
TwoFactorAuthMethod.REMEMBER to null,
|
||||
TwoFactorAuthMethod.DUO_ORGANIZATION to null,
|
||||
TwoFactorAuthMethod.FIDO_2_WEB_APP to null,
|
||||
TwoFactorAuthMethod.WEB_AUTH to null,
|
||||
TwoFactorAuthMethod.RECOVERY_CODE to null,
|
||||
)
|
||||
.forEach { (type, imageRes) ->
|
||||
|
|
Loading…
Reference in a new issue