twoFa -> validation naming; fixes for preview for screens (separating view model from ui); some improvements & fixes

This commit is contained in:
2024-07-13 22:45:49 +03:00
parent dfdc48b682
commit 733627f935
98 changed files with 1611 additions and 1637 deletions
@@ -7,9 +7,9 @@ data class AuthDirectRequest(
val username: String,
val password: String,
val scope: String,
val twoFaSupported: Boolean = true,
val twoFaForceSms: Boolean = false,
val twoFaCode: String? = null,
val validationSupported: Boolean = true,
val validationForceSms: Boolean = false,
val validationCode: String? = null,
val captchaSid: String? = null,
val captchaKey: String? = null,
val trustedHash: String? = null
@@ -23,11 +23,11 @@ data class AuthDirectRequest(
"username" to username,
"password" to password,
"scope" to scope,
"2fa_supported" to if (twoFaSupported) "1" else "0",
"force_sms" to if (twoFaForceSms) "1" else "0"
"2fa_supported" to if (validationSupported) "1" else "0",
"force_sms" to if (validationForceSms) "1" else "0"
)
.apply {
twoFaCode?.let { this["code"] = it }
validationCode?.let { this["code"] = it }
captchaSid?.let { this["captcha_sid"] = it }
captchaKey?.let { this["captcha_key"] = it }
trustedHash?.let { this["trusted_hash"] = it }
@@ -7,7 +7,7 @@ import com.squareup.moshi.JsonClass
data class AuthDirectResponse(
@Json(name = "access_token") val accessToken: String?,
@Json(name = "user_id") val userId: Int?,
@Json(name = "trusted_hash") val twoFaHash: String?,
@Json(name = "trusted_hash") val validationHash: String?,
@Json(name = "validation_sid") val validationSid: String?,
@Json(name = "validation_type") val validationType: String?,
@Json(name = "phone_mask") val phoneMask: String?,