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

54 lines
2.1 KiB
Java
Raw Permalink 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 com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.internal.p002firebaseauthapi.zzaay;
/* loaded from: classes2.dex */
public class GoogleAuthCredential extends AuthCredential {
public static final Parcelable.Creator<GoogleAuthCredential> CREATOR = new zzac();
private final String zza;
private final String zzb;
/* JADX INFO: Access modifiers changed from: package-private */
public GoogleAuthCredential(String str, String str2) {
if (str != null || str2 != null) {
if (str == null || str.length() != 0) {
if (str2 != null && str2.length() == 0) {
throw new IllegalArgumentException("accessToken cannot be empty");
}
this.zza = str;
this.zzb = str2;
return;
}
throw new IllegalArgumentException("idToken cannot be empty");
}
throw new IllegalArgumentException("Must specify an idToken or an accessToken.");
}
public static zzaay zzb(GoogleAuthCredential googleAuthCredential, String str) {
Preconditions.checkNotNull(googleAuthCredential);
return new zzaay(googleAuthCredential.zza, googleAuthCredential.zzb, googleAuthCredential.getProvider(), null, null, null, str, null, null);
}
@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.finishObjectHeader(parcel, beginObjectHeader);
}
@Override // com.google.firebase.auth.AuthCredential
public final AuthCredential zza() {
return new GoogleAuthCredential(this.zza, this.zzb);
}
@Override // com.google.firebase.auth.AuthCredential
public String getProvider() {
return "google.com";
}
}