public async Task <string> LoginUserAsync([FromBody] UserLoginWriteModel userLogin) { var user = await _userAuthDomainServiceProxy.GetUserLoginInfoAsync(userLogin.UserName); if (user == null || !user.IsActive) { throw new OperationException("User not found"); } if (user.IsLocked) { throw new OperationException("User is locked"); } await _userAuthDomainServiceProxy.PasswordSignInAsync(userLogin); var userToken = _oAuthService.GetUserAuthToken(userLogin.UserName, user.Id, user.Roles); return(userToken); }
public async Task PasswordSignInAsync(UserLoginWriteModel userLogin) { await _userAuthDomainService.PasswordSignInAsync(userLogin); }
public async Task PasswordSignInAsync(UserLoginWriteModel userLogin) { await _signInManager.PasswordSignInAsync(userLogin.UserName, userLogin.Password, userLogin.RememberMe, false); }