Skip to content

Commit 9a074d8

Browse files
committed
Fix merge csproj
1 parent 342c079 commit 9a074d8

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

PokemonGo.RocketAPI/Login/GoogleLogin.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using DankMemes.GPSOAuthSharp;
1+
using DankMemes.GPSOAuthSharp;
22
using PokemonGo.RocketAPI.Exceptions;
33
using System;
44
using System.Collections.Generic;
@@ -24,25 +24,25 @@ public GoogleLogin(string email, string password)
2424

2525
public async Task<string> GetAccessToken()
2626
{
27-
var client = new GPSOAuthClient(email, password);
27+
var client = new GPSOAuthClient(email, password);
2828
var response = client.PerformMasterLogin();
2929

30-
if (response.ContainsKey("Error"))
31-
throw new GoogleException(response["Error"]);
32-
33-
//Todo: captcha/2fa implementation
34-
35-
if (!response.ContainsKey("Auth"))
36-
throw new GoogleOfflineException();
37-
38-
var oauthResponse = client.PerformOAuth(response["Token"],
39-
"audience:server:client_id:848232511240-7so421jotr2609rmqakceuu1luuq0ptb.apps.googleusercontent.com",
40-
"com.nianticlabs.pokemongo",
41-
"321187995bc7cdc2b5fc91b11a96e2baa8602c62");
42-
43-
if (!oauthResponse.ContainsKey("Auth"))
44-
throw new GoogleOfflineException();
45-
30+
if (response.ContainsKey("Error"))
31+
throw new GoogleException(response["Error"]);
32+
33+
//Todo: captcha/2fa implementation
34+
35+
if (!response.ContainsKey("Auth"))
36+
throw new GoogleOfflineException();
37+
38+
var oauthResponse = client.PerformOAuth(response["Token"],
39+
"audience:server:client_id:848232511240-7so421jotr2609rmqakceuu1luuq0ptb.apps.googleusercontent.com",
40+
"com.nianticlabs.pokemongo",
41+
"321187995bc7cdc2b5fc91b11a96e2baa8602c62");
42+
43+
if (!oauthResponse.ContainsKey("Auth"))
44+
throw new GoogleOfflineException();
45+
4646
return oauthResponse["Auth"];
4747
}
4848
}

PokemonGo.RocketAPI/Login/PtcLogin.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
22
using PokemonGo.RocketAPI.Exceptions;
33
using System.Collections.Generic;
44
using System.Net;
@@ -26,7 +26,7 @@ public async Task<string> GetAccessToken()
2626
AllowAutoRedirect = false
2727
};
2828

29-
using (var tempHttpClient = new HttpClient(handler))
29+
using (var tempHttpClient = new System.Net.Http.HttpClient(handler))
3030
{
3131
//Get session cookie
3232
var sessionData = await GetSessionCookie(tempHttpClient).ConfigureAwait(false);
@@ -73,7 +73,7 @@ private static IDictionary<string, string> GenerateTokenVarRequest(string ticket
7373
{"code", ticketId}
7474
};
7575

76-
private static async Task<string> GetLoginTicket(string username, string password, HttpClient tempHttpClient, SessionData sessionData)
76+
private static async Task<string> GetLoginTicket(string username, string password, System.Net.Http.HttpClient tempHttpClient, SessionData sessionData)
7777
{
7878
HttpResponseMessage loginResp;
7979
var loginRequest = GenerateLoginRequest(sessionData, username, password);
@@ -86,15 +86,15 @@ private static async Task<string> GetLoginTicket(string username, string passwor
8686
return ticketId;
8787
}
8888

89-
private static async Task<SessionData> GetSessionCookie(HttpClient tempHttpClient)
89+
private static async Task<SessionData> GetSessionCookie(System.Net.Http.HttpClient tempHttpClient)
9090
{
9191
var sessionResp = await tempHttpClient.GetAsync(Resources.PtcLoginUrl).ConfigureAwait(false);
9292
var data = await sessionResp.Content.ReadAsStringAsync().ConfigureAwait(false);
9393
var sessionData = JsonConvert.DeserializeObject<SessionData>(data);
9494
return sessionData;
9595
}
9696

97-
private static async Task<string> GetToken(HttpClient tempHttpClient, string ticketId)
97+
private static async Task<string> GetToken(System.Net.Http.HttpClient tempHttpClient, string ticketId)
9898
{
9999
HttpResponseMessage tokenResp;
100100
var tokenRequest = GenerateTokenVarRequest(ticketId);

PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<ItemGroup>
8686
<Compile Include="Exceptions\GoogleException.cs" />
8787
<Compile Include="Exceptions\GoogleOfflineException.cs" />
88+
<Compile Include="Exceptions\LoginFailedException.cs" />
8889
<Compile Include="HttpClient\PokemonClient.cs" />
8990
<Compile Include="Enums\AuthType.cs" />
9091
<Compile Include="Exceptions\AccessTokenExpiredException.cs" />
@@ -99,7 +100,7 @@
99100
<Compile Include="Helpers\Utils.cs" />
100101
<Compile Include="ISettings.cs" />
101102
<Compile Include="Login\GoogleLogin.cs" />
102-
<Compile Include="Login\GoogleLoginGPSOAuth.cs" />
103+
<Compile Include="Login\ILoginType.cs" />
103104
<Compile Include="Login\PtcLogin.cs" />
104105
<Compile Include="Rpc\BaseRpc.cs" />
105106
<Compile Include="Rpc\Download.cs" />

0 commit comments

Comments
 (0)