Esempio n. 1
0
        public async Task DoPtcLogin(string username, string password)
        {
            _client.AuthToken = await PtcLogin.GetAccessToken(username, password);

            _client.AuthType = AuthType.Ptc;

            await SetServer();
        }
Esempio n. 2
0
        public async Task DoPtcLogin(string username, string password)
        {
            try
            {
                _accessToken = await PtcLogin.GetAccessToken(username, password);

                _authType = AuthType.Ptc;
            }
            catch (Newtonsoft.Json.JsonReaderException) { ColoredConsoleWrite(ConsoleColor.White, "Json Reader Exception - Server down? - Restarting"); DoPtcLogin(username, password); }
            catch (Exception ex) { ColoredConsoleWrite(ConsoleColor.White, ex.ToString() + "Exception - Please report - Restarting"); DoPtcLogin(username, password); }
        }
Esempio n. 3
0
        public async Task DoPtcLogin(string username, string password)
        {
            try
            {
                _accessToken = await PtcLogin.GetAccessToken(username, password);

                _authType = AuthType.Ptc;
            }
            catch (Newtonsoft.Json.JsonReaderException) { ColoredConsoleWrite(ConsoleColor.White, "JsonReaderException: Server down? - Restarting!"); DoPtcLogin(username, password); }
            catch (Exceptions.AccountNotVerifiedException) { ColoredConsoleWrite(ConsoleColor.Red, "AccountNotVerifiedException: ACCOUNT NOT VERIFIED"); }
            catch (NullReferenceException) { ColoredConsoleWrite(ConsoleColor.Red, "NullReferenceException: Login credentials invalid?"); }
            catch (Exception ex) { ColoredConsoleWrite(ConsoleColor.White, ex.ToString() + "Exception - Please report - Restarting"); DoPtcLogin(username, password); }
        }
Esempio n. 4
0
        public async Task DoPtcLogin(string username, string password)
        {
            _accessToken = await PtcLogin.GetAccessToken(username, password);

            _authType = AuthType.Ptc;
        }