package androidx.credentials.webauthn; import androidx.annotation.RestrictTo; import com.ironsource.cr; import kotlin.jvm.internal.Intrinsics; import org.json.JSONObject; @RestrictTo({RestrictTo.Scope.LIBRARY}) /* loaded from: classes.dex */ public final class FidoPublicKeyCredential { private final String authenticatorAttachment; private final byte[] rawId; private final AuthenticatorResponse response; public final String getAuthenticatorAttachment() { return this.authenticatorAttachment; } public final byte[] getRawId() { return this.rawId; } public final AuthenticatorResponse getResponse() { return this.response; } public FidoPublicKeyCredential(byte[] rawId, AuthenticatorResponse response, String authenticatorAttachment) { Intrinsics.checkNotNullParameter(rawId, "rawId"); Intrinsics.checkNotNullParameter(response, "response"); Intrinsics.checkNotNullParameter(authenticatorAttachment, "authenticatorAttachment"); this.rawId = rawId; this.response = response; this.authenticatorAttachment = authenticatorAttachment; } public final String json() { String b64Encode = WebAuthnUtils.Companion.b64Encode(this.rawId); JSONObject jSONObject = new JSONObject(); jSONObject.put("id", b64Encode); jSONObject.put("rawId", b64Encode); jSONObject.put("type", "public-key"); jSONObject.put("authenticatorAttachment", this.authenticatorAttachment); jSONObject.put(cr.n, this.response.json()); jSONObject.put("clientExtensionResults", new JSONObject()); String jSONObject2 = jSONObject.toString(); Intrinsics.checkNotNullExpressionValue(jSONObject2, "ret.toString()"); return jSONObject2; } }