package androidx.credentials.webauthn; import androidx.annotation.RestrictTo; import androidx.credentials.webauthn.WebAuthnUtils; import com.google.android.gms.fido.u2f.api.common.ClientData; import kotlin.jvm.internal.Intrinsics; import org.json.JSONObject; @RestrictTo({RestrictTo.Scope.LIBRARY}) /* loaded from: classes.dex */ public final class PublicKeyCredentialRequestOptions { private final byte[] challenge; private final JSONObject json; private final String rpId; private final long timeout; private final String userVerification; public final byte[] getChallenge() { return this.challenge; } public final JSONObject getJson() { return this.json; } public final String getRpId() { return this.rpId; } public final long getTimeout() { return this.timeout; } public final String getUserVerification() { return this.userVerification; } public PublicKeyCredentialRequestOptions(String requestJson) { Intrinsics.checkNotNullParameter(requestJson, "requestJson"); JSONObject jSONObject = new JSONObject(requestJson); this.json = jSONObject; String challengeString = jSONObject.getString(ClientData.KEY_CHALLENGE); WebAuthnUtils.Companion companion = WebAuthnUtils.Companion; Intrinsics.checkNotNullExpressionValue(challengeString, "challengeString"); this.challenge = companion.b64Decode(challengeString); this.timeout = jSONObject.optLong("timeout", 0L); String optString = jSONObject.optString("rpId", ""); Intrinsics.checkNotNullExpressionValue(optString, "json.optString(\"rpId\", \"\")"); this.rpId = optString; String optString2 = jSONObject.optString("userVerification", "preferred"); Intrinsics.checkNotNullExpressionValue(optString2, "json.optString(\"userVerification\", \"preferred\")"); this.userVerification = optString2; } }