Ejemplo n.º 1
0
        public async void UserRegister(string userName, string userPassword, string userDeviceCode)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("action", "registerUser");
            dic.Add("user_name", RSAEncryptHelper.PublicEncrypt(userName));
            dic.Add("user_password", RSAEncryptHelper.PublicEncrypt(userPassword));
            User response = await PostDictionary <User>(dic);
        }
Ejemplo n.º 2
0
        public async Task <bool> SignInAsync(SignInInput accountPassword)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("action", "userLogin");
            dic.Add("user_name", RSAEncryptHelper.PublicEncrypt(accountPassword.Account));
            dic.Add("user_password", RSAEncryptHelper.PublicEncrypt(accountPassword.Password));
            User user = await PostDictionary <User>(dic);

            if (user != null)
            {
                AppEnvironment.Instance.CurrentUser = user;
                return(true);
            }
            return(false);
        }