what-the-bank/sources/com/google/firebase/auth/EmailAuthCredential.java

85 lines
2.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.auth;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
/* loaded from: classes2.dex */
public class EmailAuthCredential extends AuthCredential {
public static final Parcelable.Creator<EmailAuthCredential> CREATOR = new zzg();
private String zza;
private String zzb;
private final String zzc;
private String zzd;
private boolean zze;
/* JADX INFO: Access modifiers changed from: package-private */
public EmailAuthCredential(String str, String str2, String str3, String str4, boolean z) {
this.zza = Preconditions.checkNotEmpty(str);
if (TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3)) {
throw new IllegalArgumentException("Cannot create an EmailAuthCredential without a password or emailLink.");
}
this.zzb = str2;
this.zzc = str3;
this.zzd = str4;
this.zze = z;
}
public String getSignInMethod() {
return !TextUtils.isEmpty(this.zzb) ? "password" : "emailLink";
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 1, this.zza, false);
SafeParcelWriter.writeString(parcel, 2, this.zzb, false);
SafeParcelWriter.writeString(parcel, 3, this.zzc, false);
SafeParcelWriter.writeString(parcel, 4, this.zzd, false);
SafeParcelWriter.writeBoolean(parcel, 5, this.zze);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
@Override // com.google.firebase.auth.AuthCredential
public final AuthCredential zza() {
return new EmailAuthCredential(this.zza, this.zzb, this.zzc, this.zzd, this.zze);
}
public final EmailAuthCredential zzb(FirebaseUser firebaseUser) {
this.zzd = firebaseUser.zzf();
this.zze = true;
return this;
}
public final boolean zzg() {
return !TextUtils.isEmpty(this.zzc);
}
public final boolean zzh() {
return this.zze;
}
public final String zzf() {
return this.zzc;
}
public final String zze() {
return this.zzb;
}
public final String zzd() {
return this.zza;
}
public final String zzc() {
return this.zzd;
}
@Override // com.google.firebase.auth.AuthCredential
public String getProvider() {
return "password";
}
}