Esempio n. 1
0
        public async Task <JsonResult> Login(LoginRequest form)
        {
            await AuthorizeManagement.SignOutAsync();

            if (form.LoginId != "test" || form.Password != "1234")
            {
                return(Json(new { result = false }));
            }

            await AuthorizeManagement.SignInAsync(form.LoginId);

            return(Json(new { result = true }));
        }
Esempio n. 2
0
        public async Task <IActionResult> LogOut()
        {
            await AuthorizeManagement.SignOutAsync();

            return(RedirectToAction("Index"));
        }