51 lines
2.1 KiB
Java
51 lines
2.1 KiB
Java
package c.i.a.f.c.a.f.b;
|
|
|
|
import c.i.a.f.e.h.j.o;
|
|
import c.i.a.f.e.l.a;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.google.android.gms.common.api.Status;
|
|
import java.io.IOException;
|
|
import java.net.HttpURLConnection;
|
|
import java.net.URL;
|
|
/* compiled from: com.google.android.gms:play-services-auth@@19.0.0 */
|
|
public final class e implements Runnable {
|
|
public static final a i = new a("RevokeAccessOperation", new String[0]);
|
|
public final String j;
|
|
public final o k = new o(null);
|
|
|
|
public e(String str) {
|
|
AnimatableValueParser.w(str);
|
|
this.j = str;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
Status status = Status.k;
|
|
try {
|
|
String valueOf = String.valueOf(this.j);
|
|
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(valueOf.length() != 0 ? "https://accounts.google.com/o/oauth2/revoke?token=".concat(valueOf) : new String("https://accounts.google.com/o/oauth2/revoke?token=")).openConnection();
|
|
httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
|
int responseCode = httpURLConnection.getResponseCode();
|
|
if (responseCode == 200) {
|
|
status = Status.i;
|
|
} else {
|
|
i.b("Unable to revoke access!", new Object[0]);
|
|
}
|
|
a aVar = i;
|
|
StringBuilder sb = new StringBuilder(26);
|
|
sb.append("Response Code: ");
|
|
sb.append(responseCode);
|
|
aVar.a(sb.toString(), new Object[0]);
|
|
} catch (IOException e) {
|
|
a aVar2 = i;
|
|
String valueOf2 = String.valueOf(e.toString());
|
|
aVar2.b(valueOf2.length() != 0 ? "IOException when revoking access: ".concat(valueOf2) : new String("IOException when revoking access: "), new Object[0]);
|
|
} catch (Exception e2) {
|
|
a aVar3 = i;
|
|
String valueOf3 = String.valueOf(e2.toString());
|
|
aVar3.b(valueOf3.length() != 0 ? "Exception when revoking access: ".concat(valueOf3) : new String("Exception when revoking access: "), new Object[0]);
|
|
}
|
|
this.k.b(status);
|
|
}
|
|
}
|