-
Notifications
You must be signed in to change notification settings - Fork 170
SDK-6103 Added support for My Account API. #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
c8243e3
58ebd47
c0703ad
a702900
13da6ba
c42e67f
eddddc0
25b4e13
6ae1fe1
93c507b
5a71404
db02f71
bb3adc3
4689ff3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package com.auth0.android.myaccount | ||
|
|
||
| public enum class PhoneAuthenticationMethodType(public val value: String) { | ||
| SMS("sms"), | ||
| VOICE("voice") | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| package com.auth0.android.result | ||
|
|
||
| import com.google.gson.JsonDeserializationContext | ||
| import com.google.gson.JsonDeserializer | ||
| import com.google.gson.JsonElement | ||
| import com.google.gson.annotations.JsonAdapter | ||
| import com.google.gson.annotations.SerializedName | ||
| import java.lang.reflect.Type | ||
|
|
||
| public data class AuthenticationMethods( | ||
| @SerializedName("authentication_methods") | ||
| public val authenticationMethods: List<AuthenticationMethod> | ||
| ) | ||
|
|
||
| @JsonAdapter(AuthenticationMethod.Deserializer::class) | ||
| public sealed class AuthenticationMethod { | ||
| public abstract val id: String | ||
| public abstract val type: String | ||
| public abstract val createdAt: String | ||
| public abstract val usage: List<String> | ||
|
|
||
| internal class Deserializer : JsonDeserializer<AuthenticationMethod> { | ||
| override fun deserialize( | ||
| json: JsonElement, | ||
| typeOfT: Type, | ||
| context: JsonDeserializationContext | ||
| ): AuthenticationMethod? { | ||
| val jsonObject = json.asJsonObject | ||
| val type = jsonObject.get("type")?.asString | ||
| val targetClass = when (type) { | ||
| "password" -> PasswordAuthenticationMethod::class.java | ||
| "passkey" -> PasskeyAuthenticationMethod::class.java | ||
| "recovery-code" -> RecoveryCodeAuthenticationMethod::class.java | ||
| "push-notification" -> PushNotificationAuthenticationMethod::class.java | ||
| "totp" -> TotpAuthenticationMethod::class.java | ||
| "webauthn-platform" -> WebAuthnPlatformAuthenticationMethod::class.java | ||
| "webauthn-roaming" -> WebAuthnRoamingAuthenticationMethod::class.java | ||
| "phone" -> PhoneAuthenticationMethod::class.java | ||
| "email" -> EmailAuthenticationMethod::class.java | ||
| else -> null | ||
| } | ||
| return context.deserialize(jsonObject, targetClass) | ||
| } | ||
| } | ||
|
Comment on lines
+26
to
+44
Check noticeCode scanning / CodeQL Unused classes and interfaces Note
Unused class: Deserializer is not referenced within this codebase. If not used as an external API it should be removed.
Copilot AutofixAI 8 months ago Copilot could not generate an autofix suggestion Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support. |
||
| } | ||
|
|
||
| public data class PasswordAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("identity_user_id") | ||
| public val identityUserId: String?, | ||
| @SerializedName("last_password_reset") | ||
| public val lastPasswordReset: String? | ||
| ) : AuthenticationMethod() | ||
|
|
||
| public data class PasskeyAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("credential_backed_up") | ||
| public val credentialBackedUp: Boolean?, | ||
| @SerializedName("credential_device_type") | ||
| public val credentialDeviceType: String?, | ||
| @SerializedName("identity_user_id") | ||
| public val identityUserId: String?, | ||
| @SerializedName("key_id") | ||
| public val keyId: String?, | ||
| @SerializedName("public_key") | ||
| public val publicKey: String?, | ||
| @SerializedName("transports") | ||
| public val transports: List<String>?, | ||
| @SerializedName("user_agent") | ||
| public val userAgent: String?, | ||
| @SerializedName("user_handle") | ||
| public val userHandle: String? | ||
| ) : AuthenticationMethod() | ||
|
|
||
| public sealed class MfaAuthenticationMethod : AuthenticationMethod() { | ||
| public abstract val confirmed: Boolean? | ||
| } | ||
|
|
||
| public data class RecoveryCodeAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean? | ||
| ) : MfaAuthenticationMethod() | ||
|
|
||
| public data class PushNotificationAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") | ||
| public val name: String? | ||
| ) : MfaAuthenticationMethod() | ||
|
|
||
| public data class TotpAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") | ||
| public val name: String? | ||
| ) : MfaAuthenticationMethod() | ||
|
|
||
| public sealed class WebAuthnAuthenticationMethod : MfaAuthenticationMethod() { | ||
| public abstract val name: String? | ||
| public abstract val keyId: String? | ||
| public abstract val publicKey: String? | ||
| } | ||
|
|
||
| public data class WebAuthnPlatformAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") override val name: String?, | ||
| @SerializedName("key_id") override val keyId: String?, | ||
| @SerializedName("public_key") override val publicKey: String? | ||
| ) : WebAuthnAuthenticationMethod() | ||
|
|
||
| public data class WebAuthnRoamingAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") override val name: String?, | ||
| @SerializedName("key_id") override val keyId: String?, | ||
| @SerializedName("public_key") override val publicKey: String? | ||
| ) : WebAuthnAuthenticationMethod() | ||
|
|
||
| public data class PhoneAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") | ||
| public val name: String?, | ||
| @SerializedName("phone_number") | ||
| public val phoneNumber: String?, | ||
| @SerializedName("preferred_authentication_method") | ||
| public val preferredAuthenticationMethod: String? | ||
| ) : MfaAuthenticationMethod() | ||
|
|
||
| public data class EmailAuthenticationMethod( | ||
| @SerializedName("id") override val id: String, | ||
| @SerializedName("type") override val type: String, | ||
| @SerializedName("created_at") override val createdAt: String, | ||
| @SerializedName("usage") override val usage: List<String>, | ||
| @SerializedName("confirmed") override val confirmed: Boolean?, | ||
| @SerializedName("name") | ||
| public val name: String?, | ||
| @SerializedName("email") | ||
| public val email: String? | ||
| ) : MfaAuthenticationMethod() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| package com.auth0.android.result | ||
|
|
||
| import com.google.gson.JsonDeserializationContext | ||
| import com.google.gson.JsonDeserializer | ||
| import com.google.gson.JsonElement | ||
| import com.google.gson.annotations.JsonAdapter | ||
| import com.google.gson.annotations.SerializedName | ||
| import java.lang.reflect.Type | ||
|
|
||
| @JsonAdapter(EnrollmentChallenge.Deserializer::class) | ||
| public sealed class EnrollmentChallenge { | ||
| public abstract val id: String? | ||
| public abstract val authSession: String | ||
|
|
||
| internal class Deserializer : JsonDeserializer<EnrollmentChallenge> { | ||
| override fun deserialize( | ||
| json: JsonElement, | ||
| typeOfT: Type, | ||
| context: JsonDeserializationContext | ||
| ): EnrollmentChallenge? { | ||
| val jsonObject = json.asJsonObject | ||
| val targetClass = when { | ||
| jsonObject.has("barcode_uri") -> TotpEnrollmentChallenge::class.java | ||
| jsonObject.has("recovery_code") -> RecoveryCodeEnrollmentChallenge::class.java | ||
| jsonObject.has("authn_params_public_key") -> PasskeyEnrollmentChallenge::class.java | ||
| else -> MfaEnrollmentChallenge::class.java | ||
|
pmathew92 marked this conversation as resolved.
|
||
| } | ||
| return context.deserialize(jsonObject, targetClass) | ||
| } | ||
| } | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Dismissed
|
||
| } | ||
|
|
||
| public data class MfaEnrollmentChallenge( | ||
| @SerializedName("id") | ||
| override val id: String, | ||
| @SerializedName("auth_session") | ||
| override val authSession: String | ||
| ) : EnrollmentChallenge() | ||
|
|
||
| public data class TotpEnrollmentChallenge( | ||
| @SerializedName("id") | ||
| override val id: String, | ||
| @SerializedName("auth_session") | ||
| override val authSession: String, | ||
| @SerializedName("barcode_uri") | ||
| public val barcodeUri: String, | ||
| @SerializedName("manual_input_code") | ||
| public val manualInputCode: String? | ||
| ) : EnrollmentChallenge() | ||
|
|
||
| public data class RecoveryCodeEnrollmentChallenge( | ||
| @SerializedName("id") | ||
| override val id: String, | ||
| @SerializedName("auth_session") | ||
| override val authSession: String, | ||
| @SerializedName("recovery_code") | ||
| public val recoveryCode: String | ||
| ) : EnrollmentChallenge() | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| package com.auth0.android.result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.google.gson.annotations.SerializedName | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Represents the payload for an enrollment request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * This is a sealed class to handle different types of enrollment payloads. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public sealed class EnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @SerializedName("type") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public open val type: String | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class PasskeyEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @SerializedName("connection") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public val connection: String?, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @SerializedName("identity_user_id") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public val identityUserId: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("passkey") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class WebAuthnPlatformEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be a normal class ? This way you don't have to add an empty placeholder for the data class
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maintain consistency within the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. normal class can also be part of sealed class ? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private val placeholder: String? = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("webauthn-platform") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class WebAuthnRoamingEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private val placeholder: String? = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("webauthn-roaming") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aintain consistency within the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class TotpEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private val placeholder: String? = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("totp") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aintain consistency within the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class PushNotificationEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private val placeholder: String? = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aintain consistency within the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("push-notification") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public data class RecoveryCodeEnrollmentPayload( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private val placeholder: String? = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aintain consistency within the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("recovery-code") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using placeholder parameters in data classes is not a good practice. Consider using object declarations for payload types that don't need additional properties, or remove these placeholder fields entirely.
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using placeholder parameters in data classes is not a good practice. Consider using object declarations for payload types that don't need additional properties, or remove these placeholder fields entirely.
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using placeholder parameters in data classes is not a good practice. Consider using object declarations for payload types that don't need additional properties, or remove these placeholder fields entirely.
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
Copilot
AI
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using placeholder parameters in data classes is not a good practice. Consider using object declarations for payload types that don't need additional properties, or remove these placeholder fields entirely.
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Multiple classes use identical placeholder properties that serve no functional purpose. Consider using object declarations instead of data classes for payload types that don't require additional properties, or remove the placeholder entirely if not needed for serialization.
| public data class WebAuthnPlatformEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-platform") | |
| public data class WebAuthnRoamingEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-roaming") | |
| public data class TotpEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("totp") | |
| public data class PushNotificationEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("push-notification") | |
| public data class RecoveryCodeEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Multiple classes use identical placeholder properties that serve no functional purpose. Consider using object declarations instead of data classes for payload types that don't require additional properties, or remove the placeholder entirely if not needed for serialization.
| public data class WebAuthnPlatformEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-platform") | |
| public data class WebAuthnRoamingEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-roaming") | |
| public data class TotpEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("totp") | |
| public data class PushNotificationEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("push-notification") | |
| public data class RecoveryCodeEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Multiple classes use identical placeholder properties that serve no functional purpose. Consider using object declarations instead of data classes for payload types that don't require additional properties, or remove the placeholder entirely if not needed for serialization.
| public data class WebAuthnPlatformEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-platform") | |
| public data class WebAuthnRoamingEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-roaming") | |
| public data class TotpEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("totp") | |
| public data class PushNotificationEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("push-notification") | |
| public data class RecoveryCodeEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Multiple classes use identical placeholder properties that serve no functional purpose. Consider using object declarations instead of data classes for payload types that don't require additional properties, or remove the placeholder entirely if not needed for serialization.
| public data class WebAuthnPlatformEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-platform") | |
| public data class WebAuthnRoamingEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-roaming") | |
| public data class TotpEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("totp") | |
| public data class PushNotificationEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("push-notification") | |
| public data class RecoveryCodeEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Multiple classes use identical placeholder properties that serve no functional purpose. Consider using object declarations instead of data classes for payload types that don't require additional properties, or remove the placeholder entirely if not needed for serialization.
| public data class WebAuthnPlatformEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-platform") | |
| public data class WebAuthnRoamingEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("webauthn-roaming") | |
| public data class TotpEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("totp") | |
| public data class PushNotificationEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("push-notification") | |
| public data class RecoveryCodeEnrollmentPayload( | |
| private val placeholder: String? = null | |
| ) : EnrollmentPayload("recovery-code") | |
| public object WebAuthnPlatformEnrollmentPayload : EnrollmentPayload("webauthn-platform") | |
| public object WebAuthnRoamingEnrollmentPayload : EnrollmentPayload("webauthn-roaming") | |
| public object TotpEnrollmentPayload : EnrollmentPayload("totp") | |
| public object PushNotificationEnrollmentPayload : EnrollmentPayload("push-notification") | |
| public object RecoveryCodeEnrollmentPayload : EnrollmentPayload("recovery-code") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package com.auth0.android.result | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| /** | ||
| * Represents a standardized error response from the My Account API. | ||
| */ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are already defined in the MyAccountException class . What is the need to redefine this ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I understand that. What I meant is ,the error you receive from the API is mapped to MyAccountException in the network layer. The above parameters are already defined in that class which the user can access . I also don't see any usage of this class also in the code. So delete it ,if not being used
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed [ErrorResponse.kt] |
||
| public data class ErrorResponse( | ||
| @SerializedName("type") | ||
| val type: String, | ||
| @SerializedName("status") | ||
| val status: Int, | ||
| @SerializedName("title") | ||
| val title: String, | ||
| @SerializedName("detail") | ||
| val detail: String, | ||
| @SerializedName("validation_errors") | ||
| val validationErrors: List<ValidationError>? | ||
| ) { | ||
| /** | ||
| * Represents a specific validation error within an error response. | ||
| */ | ||
| public data class ValidationError( | ||
| @SerializedName("detail") | ||
| val detail: String, | ||
| @SerializedName("field") | ||
| val field: String?, | ||
| @SerializedName("pointer") | ||
| val pointer: String?, | ||
| @SerializedName("source") | ||
| val source: String? | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||||||||||||||
| package com.auth0.android.result | ||||||||||||||||||
|
|
||||||||||||||||||
| import com.google.gson.annotations.SerializedName | ||||||||||||||||||
|
|
||||||||||||||||||
|
||||||||||||||||||
| /** | |
| * Represents a multi-factor authentication factor. | |
| * | |
| * @property type The type of factor (e.g., "totp", "sms", etc.). | |
| * @property usage The usages supported by this factor (e.g., "authentication", "recovery"). May be null. | |
| */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.auth0.android.result | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| /** | ||
| * A wrapper class for the list of factors returned by the API. | ||
| */ | ||
| public data class Factors( | ||
| @SerializedName("factors") | ||
| public val factors: List<Factor> | ||
| ) |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.