From 2904cb77b754e69c6de5fa440a8ac8768eba2813 Mon Sep 17 00:00:00 2001 From: AkinCam <172804016@ogr.cbu.edu.tr> Date: Thu, 30 Jan 2020 16:18:15 +0300 Subject: [PATCH] logout enpoint created --- .../Areas/Account/Controllers/AccountController.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs index d1f433e343..5b45f1b1ab 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers ValidateLoginInfo(login); await ReplaceEmailToUsernameOfInputIfNeeds(login).ConfigureAwait(false); - + return GetAbpLoginResult(await _signInManager.PasswordSignInAsync( login.UserNameOrEmailAddress, login.Password, @@ -44,6 +44,14 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers ).ConfigureAwait(false)); } + [HttpGet] + [Route("logout")] + public virtual async Task Logout() + { + await _signInManager.SignOutAsync(); + } + + [HttpPost] [Route("checkPassword")] public virtual async Task CheckPassword(UserLoginInfo login)