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

            _client.AuthType = AuthType.Ptc;

            await SetServer();
        }
Exemplo 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); }
        }
Exemplo 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); }
        }
Exemplo n.º 4
0
        public async Task DoPtcLogin(string username, string password)
        {
            _accessToken = await PtcLogin.GetAccessToken(username, password);

            _authType = AuthType.Ptc;
        }