package com.google.android.gms.internal.p002firebaseauthapi; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.internal.Preconditions; import org.json.JSONObject; /* loaded from: classes.dex */ public final class zzafa implements zzabc { private final String zza; private final String zzb; private final String zzc; private final String zzd; public zzafa(String str, String str2, String str3, String str4) { this.zza = Preconditions.checkNotEmpty(str); this.zzb = Preconditions.checkNotEmpty(str2); this.zzc = str3; this.zzd = str4; } @Override // com.google.android.gms.internal.p002firebaseauthapi.zzabc public final String zza() { JSONObject jSONObject = new JSONObject(); jSONObject.put(Scopes.EMAIL, this.zza); jSONObject.put("password", this.zzb); jSONObject.put("returnSecureToken", true); String str = this.zzc; if (str != null) { jSONObject.put("tenantId", str); } String str2 = this.zzd; if (str2 != null) { zzafg.zzd(jSONObject, "captchaResponse", str2); } else { zzafg.zzc(jSONObject); } return jSONObject.toString(); } }