what-the-bank/sources/com/google/android/gms/internal/p002firebaseauthapi/zzzg.java

45 lines
1.7 KiB
Java

package com.google.android.gms.internal.p002firebaseauthapi;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.logging.Logger;
import com.google.firebase.auth.ActionCodeUrl;
import com.google.firebase.auth.EmailAuthCredential;
import com.huawei.hms.support.feature.result.CommonConstant;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class zzzg implements zzxm {
private static final String zza = "zzzg";
private static final Logger zzb = new Logger(zza, new String[0]);
private final String zzc;
private final String zzd;
private final String zze;
public zzzg(EmailAuthCredential emailAuthCredential, String str) {
this.zzc = Preconditions.checkNotEmpty(emailAuthCredential.zzd());
this.zzd = Preconditions.checkNotEmpty(emailAuthCredential.zzf());
this.zze = str;
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzxm
public final String zza() throws JSONException {
ActionCodeUrl parseLink = ActionCodeUrl.parseLink(this.zzd);
String code = parseLink != null ? parseLink.getCode() : null;
String zza2 = parseLink != null ? parseLink.zza() : null;
JSONObject jSONObject = new JSONObject();
jSONObject.put("email", this.zzc);
if (code != null) {
jSONObject.put("oobCode", code);
}
if (zza2 != null) {
jSONObject.put("tenantId", zza2);
}
String str = this.zze;
if (str != null) {
jSONObject.put(CommonConstant.KEY_ID_TOKEN, str);
}
return jSONObject.toString();
}
}