public async Task <IActionResult> Login([FromBody] LoginModel model) { _authorizeModel = new AuthorizeModel(); await AspUserCredentials(model); if (!_authorizeModel.valid) { return(Unauthorized(new BaseResponseModel <object> { success = false, message = "Username or password is wrong!", errors = _authorizeModel.errors, code = (int)HttpStatusCode.Unauthorized })); } var res = _authorizeService.GetTokenResponse(_authorizeModel.ticket); return(Ok(new BaseResponseModel <IDictionary <string, object> > { message = "Login Successful", data = res, code = (int)HttpStatusCode.OK })); }