- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
744 lines
40 KiB
Java
744 lines
40 KiB
Java
package com.facebook;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import android.util.Base64;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import com.facebook.internal.Utility;
|
|
import com.facebook.internal.Validate;
|
|
import com.google.ar.core.ImageMetadata;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import java.nio.charset.Charset;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.HashSet;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.IntCompanionObject;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.StringCompanionObject;
|
|
import kotlin.text.Charsets;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class AuthenticationTokenClaims implements Parcelable {
|
|
public static final String JSON_KEY_AUD = "aud";
|
|
public static final String JSON_KEY_EMAIL = "email";
|
|
public static final String JSON_KEY_EXP = "exp";
|
|
public static final String JSON_KEY_FAMILY_NAME = "family_name";
|
|
public static final String JSON_KEY_GIVEN_NAME = "given_name";
|
|
public static final String JSON_KEY_IAT = "iat";
|
|
public static final String JSON_KEY_ISS = "iss";
|
|
public static final String JSON_KEY_JIT = "jti";
|
|
public static final String JSON_KEY_MIDDLE_NAME = "middle_name";
|
|
public static final String JSON_KEY_NAME = "name";
|
|
public static final String JSON_KEY_NONCE = "nonce";
|
|
public static final String JSON_KEY_PICTURE = "picture";
|
|
public static final String JSON_KEY_SUB = "sub";
|
|
public static final String JSON_KEY_USER_AGE_RANGE = "user_age_range";
|
|
public static final String JSON_KEY_USER_BIRTHDAY = "user_birthday";
|
|
public static final String JSON_KEY_USER_FRIENDS = "user_friends";
|
|
public static final String JSON_KEY_USER_GENDER = "user_gender";
|
|
public static final String JSON_KEY_USER_HOMETOWN = "user_hometown";
|
|
public static final String JSON_KEY_USER_LINK = "user_link";
|
|
public static final String JSON_KEY_USER_LOCATION = "user_location";
|
|
public static final long MAX_TIME_SINCE_TOKEN_ISSUED = 600000;
|
|
private final String aud;
|
|
private final String email;
|
|
private final long exp;
|
|
private final String familyName;
|
|
private final String givenName;
|
|
private final long iat;
|
|
private final String iss;
|
|
private final String jti;
|
|
private final String middleName;
|
|
private final String name;
|
|
private final String nonce;
|
|
private final String picture;
|
|
private final String sub;
|
|
private final Map<String, Integer> userAgeRange;
|
|
private final String userBirthday;
|
|
private final Set<String> userFriends;
|
|
private final String userGender;
|
|
private final Map<String, String> userHometown;
|
|
private final String userLink;
|
|
private final Map<String, String> userLocation;
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final Parcelable.Creator<AuthenticationTokenClaims> CREATOR = new Parcelable.Creator<AuthenticationTokenClaims>() { // from class: com.facebook.AuthenticationTokenClaims$Companion$CREATOR$1
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public AuthenticationTokenClaims createFromParcel(Parcel source) {
|
|
Intrinsics.checkNotNullParameter(source, "source");
|
|
return new AuthenticationTokenClaims(source);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public AuthenticationTokenClaims[] newArray(int i) {
|
|
return new AuthenticationTokenClaims[i];
|
|
}
|
|
};
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, null, null, null, null, null, null, null, null, null, null, null, null, null, 1048448, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, null, null, null, null, null, null, null, null, null, null, null, null, 1048320, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, null, null, null, null, null, null, null, null, null, null, null, 1048064, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, null, null, null, null, null, null, null, null, null, null, 1047552, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, null, null, null, null, null, null, null, null, null, 1046528, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, null, null, null, null, null, null, null, null, 1044480, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, null, null, null, null, null, null, null, 1040384, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, null, null, null, null, null, null, 1032192, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, str7, null, null, null, null, null, 1015808, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7, Map<String, Integer> map) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, str7, map, null, null, null, null, 983040, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7, Map<String, Integer> map, Map<String, String> map2) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, str7, map, map2, null, null, null, ImageMetadata.SENSOR_EXPOSURE_TIME, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7, Map<String, Integer> map, Map<String, String> map2, Map<String, String> map3) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, str7, map, map2, map3, null, null, 786432, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7, Map<String, Integer> map, Map<String, String> map2, Map<String, String> map3, String str8) {
|
|
this(jti, iss, aud, nonce, j, j2, sub, str, str2, str3, str4, str5, str6, collection, str7, map, map2, map3, str8, null, 524288, null);
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public final String getAud() {
|
|
return this.aud;
|
|
}
|
|
|
|
public final String getEmail() {
|
|
return this.email;
|
|
}
|
|
|
|
public final long getExp() {
|
|
return this.exp;
|
|
}
|
|
|
|
public final String getFamilyName() {
|
|
return this.familyName;
|
|
}
|
|
|
|
public final String getGivenName() {
|
|
return this.givenName;
|
|
}
|
|
|
|
public final long getIat() {
|
|
return this.iat;
|
|
}
|
|
|
|
public final String getIss() {
|
|
return this.iss;
|
|
}
|
|
|
|
public final String getJti() {
|
|
return this.jti;
|
|
}
|
|
|
|
public final String getMiddleName() {
|
|
return this.middleName;
|
|
}
|
|
|
|
public final String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public final String getNonce() {
|
|
return this.nonce;
|
|
}
|
|
|
|
public final String getPicture() {
|
|
return this.picture;
|
|
}
|
|
|
|
public final String getSub() {
|
|
return this.sub;
|
|
}
|
|
|
|
public final Map<String, Integer> getUserAgeRange() {
|
|
return this.userAgeRange;
|
|
}
|
|
|
|
public final String getUserBirthday() {
|
|
return this.userBirthday;
|
|
}
|
|
|
|
public final Set<String> getUserFriends() {
|
|
return this.userFriends;
|
|
}
|
|
|
|
public final String getUserGender() {
|
|
return this.userGender;
|
|
}
|
|
|
|
public final Map<String, String> getUserHometown() {
|
|
return this.userHometown;
|
|
}
|
|
|
|
public final String getUserLink() {
|
|
return this.userLink;
|
|
}
|
|
|
|
public final Map<String, String> getUserLocation() {
|
|
return this.userLocation;
|
|
}
|
|
|
|
public AuthenticationTokenClaims(String encodedClaims, String expectedNonce) {
|
|
Intrinsics.checkNotNullParameter(encodedClaims, "encodedClaims");
|
|
Intrinsics.checkNotNullParameter(expectedNonce, "expectedNonce");
|
|
Validate.notEmpty(encodedClaims, "encodedClaims");
|
|
byte[] decodedBytes = Base64.decode(encodedClaims, 8);
|
|
Intrinsics.checkNotNullExpressionValue(decodedBytes, "decodedBytes");
|
|
JSONObject jSONObject = new JSONObject(new String(decodedBytes, Charsets.UTF_8));
|
|
if (!isValidClaims(jSONObject, expectedNonce)) {
|
|
throw new IllegalArgumentException("Invalid claims".toString());
|
|
}
|
|
String string = jSONObject.getString(JSON_KEY_JIT);
|
|
Intrinsics.checkNotNullExpressionValue(string, "jsonObj.getString(JSON_KEY_JIT)");
|
|
this.jti = string;
|
|
String string2 = jSONObject.getString(JSON_KEY_ISS);
|
|
Intrinsics.checkNotNullExpressionValue(string2, "jsonObj.getString(JSON_KEY_ISS)");
|
|
this.iss = string2;
|
|
String string3 = jSONObject.getString(JSON_KEY_AUD);
|
|
Intrinsics.checkNotNullExpressionValue(string3, "jsonObj.getString(JSON_KEY_AUD)");
|
|
this.aud = string3;
|
|
String string4 = jSONObject.getString("nonce");
|
|
Intrinsics.checkNotNullExpressionValue(string4, "jsonObj.getString(JSON_KEY_NONCE)");
|
|
this.nonce = string4;
|
|
this.exp = jSONObject.getLong(JSON_KEY_EXP);
|
|
this.iat = jSONObject.getLong(JSON_KEY_IAT);
|
|
String string5 = jSONObject.getString(JSON_KEY_SUB);
|
|
Intrinsics.checkNotNullExpressionValue(string5, "jsonObj.getString(JSON_KEY_SUB)");
|
|
this.sub = string5;
|
|
Companion companion = Companion;
|
|
this.name = companion.getNullableString$facebook_core_release(jSONObject, "name");
|
|
this.givenName = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_GIVEN_NAME);
|
|
this.middleName = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_MIDDLE_NAME);
|
|
this.familyName = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_FAMILY_NAME);
|
|
this.email = companion.getNullableString$facebook_core_release(jSONObject, "email");
|
|
this.picture = companion.getNullableString$facebook_core_release(jSONObject, "picture");
|
|
JSONArray optJSONArray = jSONObject.optJSONArray(JSON_KEY_USER_FRIENDS);
|
|
this.userFriends = optJSONArray == null ? null : Collections.unmodifiableSet(Utility.jsonArrayToSet(optJSONArray));
|
|
this.userBirthday = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_USER_BIRTHDAY);
|
|
JSONObject optJSONObject = jSONObject.optJSONObject(JSON_KEY_USER_AGE_RANGE);
|
|
this.userAgeRange = optJSONObject == null ? null : Collections.unmodifiableMap(Utility.convertJSONObjectToHashMap(optJSONObject));
|
|
JSONObject optJSONObject2 = jSONObject.optJSONObject(JSON_KEY_USER_HOMETOWN);
|
|
this.userHometown = optJSONObject2 == null ? null : Collections.unmodifiableMap(Utility.convertJSONObjectToStringMap(optJSONObject2));
|
|
JSONObject optJSONObject3 = jSONObject.optJSONObject(JSON_KEY_USER_LOCATION);
|
|
this.userLocation = optJSONObject3 != null ? Collections.unmodifiableMap(Utility.convertJSONObjectToStringMap(optJSONObject3)) : null;
|
|
this.userGender = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_USER_GENDER);
|
|
this.userLink = companion.getNullableString$facebook_core_release(jSONObject, JSON_KEY_USER_LINK);
|
|
}
|
|
|
|
public /* synthetic */ AuthenticationTokenClaims(String str, String str2, String str3, String str4, long j, long j2, String str5, String str6, String str7, String str8, String str9, String str10, String str11, Collection collection, String str12, Map map, Map map2, Map map3, String str13, String str14, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(str, str2, str3, str4, j, j2, str5, (i & 128) != 0 ? null : str6, (i & 256) != 0 ? null : str7, (i & 512) != 0 ? null : str8, (i & 1024) != 0 ? null : str9, (i & 2048) != 0 ? null : str10, (i & 4096) != 0 ? null : str11, (i & 8192) != 0 ? null : collection, (i & 16384) != 0 ? null : str12, (32768 & i) != 0 ? null : map, (65536 & i) != 0 ? null : map2, (131072 & i) != 0 ? null : map3, (262144 & i) != 0 ? null : str13, (i & 524288) != 0 ? null : str14);
|
|
}
|
|
|
|
@VisibleForTesting(otherwise = 2)
|
|
public AuthenticationTokenClaims(String jti, String iss, String aud, String nonce, long j, long j2, String sub, String str, String str2, String str3, String str4, String str5, String str6, Collection<String> collection, String str7, Map<String, Integer> map, Map<String, String> map2, Map<String, String> map3, String str8, String str9) {
|
|
Intrinsics.checkNotNullParameter(jti, "jti");
|
|
Intrinsics.checkNotNullParameter(iss, "iss");
|
|
Intrinsics.checkNotNullParameter(aud, "aud");
|
|
Intrinsics.checkNotNullParameter(nonce, "nonce");
|
|
Intrinsics.checkNotNullParameter(sub, "sub");
|
|
Validate.notEmpty(jti, JSON_KEY_JIT);
|
|
Validate.notEmpty(iss, JSON_KEY_ISS);
|
|
Validate.notEmpty(aud, JSON_KEY_AUD);
|
|
Validate.notEmpty(nonce, "nonce");
|
|
Validate.notEmpty(sub, JSON_KEY_SUB);
|
|
this.jti = jti;
|
|
this.iss = iss;
|
|
this.aud = aud;
|
|
this.nonce = nonce;
|
|
this.exp = j;
|
|
this.iat = j2;
|
|
this.sub = sub;
|
|
this.name = str;
|
|
this.givenName = str2;
|
|
this.middleName = str3;
|
|
this.familyName = str4;
|
|
this.email = str5;
|
|
this.picture = str6;
|
|
this.userFriends = collection != null ? Collections.unmodifiableSet(new HashSet(collection)) : null;
|
|
this.userBirthday = str7;
|
|
this.userAgeRange = map != null ? Collections.unmodifiableMap(new HashMap(map)) : null;
|
|
this.userHometown = map2 != null ? Collections.unmodifiableMap(new HashMap(map2)) : null;
|
|
this.userLocation = map3 != null ? Collections.unmodifiableMap(new HashMap(map3)) : null;
|
|
this.userGender = str8;
|
|
this.userLink = str9;
|
|
}
|
|
|
|
public AuthenticationTokenClaims(Parcel parcel) {
|
|
Intrinsics.checkNotNullParameter(parcel, "parcel");
|
|
this.jti = Validate.notNullOrEmpty(parcel.readString(), JSON_KEY_JIT);
|
|
this.iss = Validate.notNullOrEmpty(parcel.readString(), JSON_KEY_ISS);
|
|
this.aud = Validate.notNullOrEmpty(parcel.readString(), JSON_KEY_AUD);
|
|
this.nonce = Validate.notNullOrEmpty(parcel.readString(), "nonce");
|
|
this.exp = parcel.readLong();
|
|
this.iat = parcel.readLong();
|
|
this.sub = Validate.notNullOrEmpty(parcel.readString(), JSON_KEY_SUB);
|
|
this.name = parcel.readString();
|
|
this.givenName = parcel.readString();
|
|
this.middleName = parcel.readString();
|
|
this.familyName = parcel.readString();
|
|
this.email = parcel.readString();
|
|
this.picture = parcel.readString();
|
|
ArrayList<String> createStringArrayList = parcel.createStringArrayList();
|
|
this.userFriends = createStringArrayList != null ? Collections.unmodifiableSet(new HashSet(createStringArrayList)) : null;
|
|
this.userBirthday = parcel.readString();
|
|
HashMap readHashMap = parcel.readHashMap(IntCompanionObject.INSTANCE.getClass().getClassLoader());
|
|
readHashMap = readHashMap instanceof HashMap ? readHashMap : null;
|
|
this.userAgeRange = readHashMap != null ? Collections.unmodifiableMap(readHashMap) : null;
|
|
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
|
|
HashMap readHashMap2 = parcel.readHashMap(stringCompanionObject.getClass().getClassLoader());
|
|
readHashMap2 = readHashMap2 instanceof HashMap ? readHashMap2 : null;
|
|
this.userHometown = readHashMap2 != null ? Collections.unmodifiableMap(readHashMap2) : null;
|
|
HashMap readHashMap3 = parcel.readHashMap(stringCompanionObject.getClass().getClassLoader());
|
|
readHashMap3 = readHashMap3 instanceof HashMap ? readHashMap3 : null;
|
|
this.userLocation = readHashMap3 != null ? Collections.unmodifiableMap(readHashMap3) : null;
|
|
this.userGender = parcel.readString();
|
|
this.userLink = parcel.readString();
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel dest, int i) {
|
|
Intrinsics.checkNotNullParameter(dest, "dest");
|
|
dest.writeString(this.jti);
|
|
dest.writeString(this.iss);
|
|
dest.writeString(this.aud);
|
|
dest.writeString(this.nonce);
|
|
dest.writeLong(this.exp);
|
|
dest.writeLong(this.iat);
|
|
dest.writeString(this.sub);
|
|
dest.writeString(this.name);
|
|
dest.writeString(this.givenName);
|
|
dest.writeString(this.middleName);
|
|
dest.writeString(this.familyName);
|
|
dest.writeString(this.email);
|
|
dest.writeString(this.picture);
|
|
if (this.userFriends == null) {
|
|
dest.writeStringList(null);
|
|
} else {
|
|
dest.writeStringList(new ArrayList(this.userFriends));
|
|
}
|
|
dest.writeString(this.userBirthday);
|
|
dest.writeMap(this.userAgeRange);
|
|
dest.writeMap(this.userHometown);
|
|
dest.writeMap(this.userLocation);
|
|
dest.writeString(this.userGender);
|
|
dest.writeString(this.userLink);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof AuthenticationTokenClaims)) {
|
|
return false;
|
|
}
|
|
AuthenticationTokenClaims authenticationTokenClaims = (AuthenticationTokenClaims) obj;
|
|
return Intrinsics.areEqual(this.jti, authenticationTokenClaims.jti) && Intrinsics.areEqual(this.iss, authenticationTokenClaims.iss) && Intrinsics.areEqual(this.aud, authenticationTokenClaims.aud) && Intrinsics.areEqual(this.nonce, authenticationTokenClaims.nonce) && this.exp == authenticationTokenClaims.exp && this.iat == authenticationTokenClaims.iat && Intrinsics.areEqual(this.sub, authenticationTokenClaims.sub) && Intrinsics.areEqual(this.name, authenticationTokenClaims.name) && Intrinsics.areEqual(this.givenName, authenticationTokenClaims.givenName) && Intrinsics.areEqual(this.middleName, authenticationTokenClaims.middleName) && Intrinsics.areEqual(this.familyName, authenticationTokenClaims.familyName) && Intrinsics.areEqual(this.email, authenticationTokenClaims.email) && Intrinsics.areEqual(this.picture, authenticationTokenClaims.picture) && Intrinsics.areEqual(this.userFriends, authenticationTokenClaims.userFriends) && Intrinsics.areEqual(this.userBirthday, authenticationTokenClaims.userBirthday) && Intrinsics.areEqual(this.userAgeRange, authenticationTokenClaims.userAgeRange) && Intrinsics.areEqual(this.userHometown, authenticationTokenClaims.userHometown) && Intrinsics.areEqual(this.userLocation, authenticationTokenClaims.userLocation) && Intrinsics.areEqual(this.userGender, authenticationTokenClaims.userGender) && Intrinsics.areEqual(this.userLink, authenticationTokenClaims.userLink);
|
|
}
|
|
|
|
public int hashCode() {
|
|
int hashCode = (((((((((((((IronSourceError.ERROR_NON_EXISTENT_INSTANCE + this.jti.hashCode()) * 31) + this.iss.hashCode()) * 31) + this.aud.hashCode()) * 31) + this.nonce.hashCode()) * 31) + Long.hashCode(this.exp)) * 31) + Long.hashCode(this.iat)) * 31) + this.sub.hashCode()) * 31;
|
|
String str = this.name;
|
|
int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
|
|
String str2 = this.givenName;
|
|
int hashCode3 = (hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31;
|
|
String str3 = this.middleName;
|
|
int hashCode4 = (hashCode3 + (str3 == null ? 0 : str3.hashCode())) * 31;
|
|
String str4 = this.familyName;
|
|
int hashCode5 = (hashCode4 + (str4 == null ? 0 : str4.hashCode())) * 31;
|
|
String str5 = this.email;
|
|
int hashCode6 = (hashCode5 + (str5 == null ? 0 : str5.hashCode())) * 31;
|
|
String str6 = this.picture;
|
|
int hashCode7 = (hashCode6 + (str6 == null ? 0 : str6.hashCode())) * 31;
|
|
Set<String> set = this.userFriends;
|
|
int hashCode8 = (hashCode7 + (set == null ? 0 : set.hashCode())) * 31;
|
|
String str7 = this.userBirthday;
|
|
int hashCode9 = (hashCode8 + (str7 == null ? 0 : str7.hashCode())) * 31;
|
|
Map<String, Integer> map = this.userAgeRange;
|
|
int hashCode10 = (hashCode9 + (map == null ? 0 : map.hashCode())) * 31;
|
|
Map<String, String> map2 = this.userHometown;
|
|
int hashCode11 = (hashCode10 + (map2 == null ? 0 : map2.hashCode())) * 31;
|
|
Map<String, String> map3 = this.userLocation;
|
|
int hashCode12 = (hashCode11 + (map3 == null ? 0 : map3.hashCode())) * 31;
|
|
String str8 = this.userGender;
|
|
int hashCode13 = (hashCode12 + (str8 == null ? 0 : str8.hashCode())) * 31;
|
|
String str9 = this.userLink;
|
|
return hashCode13 + (str9 != null ? str9.hashCode() : 0);
|
|
}
|
|
|
|
public String toString() {
|
|
String jSONObject = toJSONObject$facebook_core_release().toString();
|
|
Intrinsics.checkNotNullExpressionValue(jSONObject, "claimsJsonObject.toString()");
|
|
return jSONObject;
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:16:0x0044, code lost:
|
|
|
|
if (kotlin.jvm.internal.Intrinsics.areEqual(new java.net.URL(r2).getHost(), "www.facebook.com") == false) goto L15;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private final boolean isValidClaims(org.json.JSONObject r7, java.lang.String r8) {
|
|
/*
|
|
r6 = this;
|
|
java.lang.String r0 = "iss"
|
|
r1 = 0
|
|
if (r7 != 0) goto L6
|
|
return r1
|
|
L6:
|
|
java.lang.String r2 = "jti"
|
|
java.lang.String r3 = r7.optString(r2)
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r3, r2)
|
|
int r2 = r3.length()
|
|
if (r2 != 0) goto L16
|
|
return r1
|
|
L16:
|
|
java.lang.String r2 = r7.optString(r0) // Catch: java.net.MalformedURLException -> Lc2
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r0) // Catch: java.net.MalformedURLException -> Lc2
|
|
int r0 = r2.length() // Catch: java.net.MalformedURLException -> Lc2
|
|
if (r0 != 0) goto L24
|
|
goto L46
|
|
L24:
|
|
java.net.URL r0 = new java.net.URL // Catch: java.net.MalformedURLException -> Lc2
|
|
r0.<init>(r2) // Catch: java.net.MalformedURLException -> Lc2
|
|
java.lang.String r0 = r0.getHost() // Catch: java.net.MalformedURLException -> Lc2
|
|
java.lang.String r3 = "facebook.com"
|
|
boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r3) // Catch: java.net.MalformedURLException -> Lc2
|
|
if (r0 != 0) goto L47
|
|
java.net.URL r0 = new java.net.URL // Catch: java.net.MalformedURLException -> Lc2
|
|
r0.<init>(r2) // Catch: java.net.MalformedURLException -> Lc2
|
|
java.lang.String r0 = r0.getHost() // Catch: java.net.MalformedURLException -> Lc2
|
|
java.lang.String r2 = "www.facebook.com"
|
|
boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r2) // Catch: java.net.MalformedURLException -> Lc2
|
|
if (r0 != 0) goto L47
|
|
L46:
|
|
return r1
|
|
L47:
|
|
java.lang.String r0 = "aud"
|
|
java.lang.String r2 = r7.optString(r0)
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r0)
|
|
int r0 = r2.length()
|
|
if (r0 != 0) goto L57
|
|
goto L61
|
|
L57:
|
|
java.lang.String r0 = com.facebook.FacebookSdk.getApplicationId()
|
|
boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r2, r0)
|
|
if (r0 != 0) goto L62
|
|
L61:
|
|
return r1
|
|
L62:
|
|
java.util.Date r0 = new java.util.Date
|
|
java.lang.String r2 = "exp"
|
|
long r2 = r7.optLong(r2)
|
|
r4 = 1000(0x3e8, float:1.401E-42)
|
|
long r4 = (long) r4
|
|
long r2 = r2 * r4
|
|
r0.<init>(r2)
|
|
java.util.Date r2 = new java.util.Date
|
|
r2.<init>()
|
|
boolean r0 = r2.after(r0)
|
|
if (r0 == 0) goto L7d
|
|
return r1
|
|
L7d:
|
|
java.lang.String r0 = "iat"
|
|
long r2 = r7.optLong(r0)
|
|
java.util.Date r0 = new java.util.Date
|
|
long r2 = r2 * r4
|
|
r4 = 600000(0x927c0, double:2.964394E-318)
|
|
long r2 = r2 + r4
|
|
r0.<init>(r2)
|
|
java.util.Date r2 = new java.util.Date
|
|
r2.<init>()
|
|
boolean r0 = r2.after(r0)
|
|
if (r0 == 0) goto L99
|
|
return r1
|
|
L99:
|
|
java.lang.String r0 = "sub"
|
|
java.lang.String r2 = r7.optString(r0)
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r0)
|
|
int r0 = r2.length()
|
|
if (r0 != 0) goto La9
|
|
return r1
|
|
La9:
|
|
java.lang.String r0 = "nonce"
|
|
java.lang.String r7 = r7.optString(r0)
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r7, r0)
|
|
int r0 = r7.length()
|
|
if (r0 != 0) goto Lb9
|
|
goto Lbf
|
|
Lb9:
|
|
boolean r7 = kotlin.jvm.internal.Intrinsics.areEqual(r7, r8)
|
|
if (r7 != 0) goto Lc0
|
|
Lbf:
|
|
return r1
|
|
Lc0:
|
|
r7 = 1
|
|
return r7
|
|
Lc2:
|
|
return r1
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.facebook.AuthenticationTokenClaims.isValidClaims(org.json.JSONObject, java.lang.String):boolean");
|
|
}
|
|
|
|
@VisibleForTesting(otherwise = 2)
|
|
public final String toEnCodedString() {
|
|
String authenticationTokenClaims = toString();
|
|
Charset charset = Charsets.UTF_8;
|
|
if (authenticationTokenClaims == null) {
|
|
throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
|
|
}
|
|
byte[] bytes = authenticationTokenClaims.getBytes(charset);
|
|
Intrinsics.checkNotNullExpressionValue(bytes, "(this as java.lang.String).getBytes(charset)");
|
|
String encodeToString = Base64.encodeToString(bytes, 8);
|
|
Intrinsics.checkNotNullExpressionValue(encodeToString, "encodeToString(claimsJsonString.toByteArray(), Base64.URL_SAFE)");
|
|
return encodeToString;
|
|
}
|
|
|
|
@VisibleForTesting(otherwise = 2)
|
|
public final JSONObject toJSONObject$facebook_core_release() {
|
|
JSONObject jSONObject = new JSONObject();
|
|
jSONObject.put(JSON_KEY_JIT, this.jti);
|
|
jSONObject.put(JSON_KEY_ISS, this.iss);
|
|
jSONObject.put(JSON_KEY_AUD, this.aud);
|
|
jSONObject.put("nonce", this.nonce);
|
|
jSONObject.put(JSON_KEY_EXP, this.exp);
|
|
jSONObject.put(JSON_KEY_IAT, this.iat);
|
|
String str = this.sub;
|
|
if (str != null) {
|
|
jSONObject.put(JSON_KEY_SUB, str);
|
|
}
|
|
String str2 = this.name;
|
|
if (str2 != null) {
|
|
jSONObject.put("name", str2);
|
|
}
|
|
String str3 = this.givenName;
|
|
if (str3 != null) {
|
|
jSONObject.put(JSON_KEY_GIVEN_NAME, str3);
|
|
}
|
|
String str4 = this.middleName;
|
|
if (str4 != null) {
|
|
jSONObject.put(JSON_KEY_MIDDLE_NAME, str4);
|
|
}
|
|
String str5 = this.familyName;
|
|
if (str5 != null) {
|
|
jSONObject.put(JSON_KEY_FAMILY_NAME, str5);
|
|
}
|
|
String str6 = this.email;
|
|
if (str6 != null) {
|
|
jSONObject.put("email", str6);
|
|
}
|
|
String str7 = this.picture;
|
|
if (str7 != null) {
|
|
jSONObject.put("picture", str7);
|
|
}
|
|
if (this.userFriends != null) {
|
|
jSONObject.put(JSON_KEY_USER_FRIENDS, new JSONArray((Collection) this.userFriends));
|
|
}
|
|
String str8 = this.userBirthday;
|
|
if (str8 != null) {
|
|
jSONObject.put(JSON_KEY_USER_BIRTHDAY, str8);
|
|
}
|
|
if (this.userAgeRange != null) {
|
|
jSONObject.put(JSON_KEY_USER_AGE_RANGE, new JSONObject(this.userAgeRange));
|
|
}
|
|
if (this.userHometown != null) {
|
|
jSONObject.put(JSON_KEY_USER_HOMETOWN, new JSONObject(this.userHometown));
|
|
}
|
|
if (this.userLocation != null) {
|
|
jSONObject.put(JSON_KEY_USER_LOCATION, new JSONObject(this.userLocation));
|
|
}
|
|
String str9 = this.userGender;
|
|
if (str9 != null) {
|
|
jSONObject.put(JSON_KEY_USER_GENDER, str9);
|
|
}
|
|
String str10 = this.userLink;
|
|
if (str10 != null) {
|
|
jSONObject.put(JSON_KEY_USER_LINK, str10);
|
|
}
|
|
return jSONObject;
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final String getNullableString$facebook_core_release(JSONObject jSONObject, String name) {
|
|
Intrinsics.checkNotNullParameter(jSONObject, "<this>");
|
|
Intrinsics.checkNotNullParameter(name, "name");
|
|
if (jSONObject.has(name)) {
|
|
return jSONObject.getString(name);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public final AuthenticationTokenClaims createFromJSONObject$facebook_core_release(JSONObject jsonObject) throws JSONException {
|
|
Intrinsics.checkNotNullParameter(jsonObject, "jsonObject");
|
|
String jti = jsonObject.getString(AuthenticationTokenClaims.JSON_KEY_JIT);
|
|
String iss = jsonObject.getString(AuthenticationTokenClaims.JSON_KEY_ISS);
|
|
String aud = jsonObject.getString(AuthenticationTokenClaims.JSON_KEY_AUD);
|
|
String nonce = jsonObject.getString("nonce");
|
|
long j = jsonObject.getLong(AuthenticationTokenClaims.JSON_KEY_EXP);
|
|
long j2 = jsonObject.getLong(AuthenticationTokenClaims.JSON_KEY_IAT);
|
|
String sub = jsonObject.getString(AuthenticationTokenClaims.JSON_KEY_SUB);
|
|
String nullableString$facebook_core_release = getNullableString$facebook_core_release(jsonObject, "name");
|
|
String nullableString$facebook_core_release2 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_GIVEN_NAME);
|
|
String nullableString$facebook_core_release3 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_MIDDLE_NAME);
|
|
String nullableString$facebook_core_release4 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_FAMILY_NAME);
|
|
String nullableString$facebook_core_release5 = getNullableString$facebook_core_release(jsonObject, "email");
|
|
String nullableString$facebook_core_release6 = getNullableString$facebook_core_release(jsonObject, "picture");
|
|
JSONArray optJSONArray = jsonObject.optJSONArray(AuthenticationTokenClaims.JSON_KEY_USER_FRIENDS);
|
|
String nullableString$facebook_core_release7 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_USER_BIRTHDAY);
|
|
JSONObject optJSONObject = jsonObject.optJSONObject(AuthenticationTokenClaims.JSON_KEY_USER_AGE_RANGE);
|
|
JSONObject optJSONObject2 = jsonObject.optJSONObject(AuthenticationTokenClaims.JSON_KEY_USER_HOMETOWN);
|
|
JSONObject optJSONObject3 = jsonObject.optJSONObject(AuthenticationTokenClaims.JSON_KEY_USER_LOCATION);
|
|
String nullableString$facebook_core_release8 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_USER_GENDER);
|
|
String nullableString$facebook_core_release9 = getNullableString$facebook_core_release(jsonObject, AuthenticationTokenClaims.JSON_KEY_USER_LINK);
|
|
Intrinsics.checkNotNullExpressionValue(jti, "jti");
|
|
Intrinsics.checkNotNullExpressionValue(iss, "iss");
|
|
Intrinsics.checkNotNullExpressionValue(aud, "aud");
|
|
Intrinsics.checkNotNullExpressionValue(nonce, "nonce");
|
|
Intrinsics.checkNotNullExpressionValue(sub, "sub");
|
|
return new AuthenticationTokenClaims(jti, iss, aud, nonce, j, j2, sub, nullableString$facebook_core_release, nullableString$facebook_core_release2, nullableString$facebook_core_release3, nullableString$facebook_core_release4, nullableString$facebook_core_release5, nullableString$facebook_core_release6, optJSONArray == null ? null : Utility.jsonArrayToStringList(optJSONArray), nullableString$facebook_core_release7, optJSONObject == null ? null : Utility.convertJSONObjectToHashMap(optJSONObject), optJSONObject2 == null ? null : Utility.convertJSONObjectToStringMap(optJSONObject2), optJSONObject3 != null ? Utility.convertJSONObjectToStringMap(optJSONObject3) : null, nullableString$facebook_core_release8, nullableString$facebook_core_release9);
|
|
}
|
|
}
|
|
}
|