Exemple #1
0
        public async Task <bool> SingInUser(SignInUserDto obj)
        {
            try
            {
                var Account = await SearchAccount(obj.UserName);

                if (Account.Password == obj.Password)
                {
                    if (Account != default)
                    {
                        await LoginUserHelperManager.LoginUser(Account);
                    }
                    else
                    {
                        await LoginUserHelperManager.LoginUser(Account);
                    }
                    return(true);
                }
                else
                {
                    throw new WrongPasswordException();
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemple #2
0
 public async Task SignOutUser()
 {
     await LoginUserHelperManager.LogOutUser();
 }