public System.Threading.Tasks.Task <GetLoginResponse1> GetLoginAsync(GetLoginRequest GetLoginRequest) { GetLoginRequest1 inValue = new GetLoginRequest1(); inValue.GetLoginRequest = GetLoginRequest; return(((LoginService)(this)).GetLoginAsync(inValue)); }
GetLoginResponse ILoginService.LoginResponse(GetLoginRequest prmLoginRequest) { GetLoginResponse loginResponse = new GetLoginResponse(); try { ClientesDTO clientesDTO; ICustomerServiceBusiness iCSBusiness; clientesDTO = new ClientesDTO { User = prmLoginRequest.Login.User, Password = prmLoginRequest.Login.Password }; iCSBusiness = new CustomerServicesBusiness(); loginResponse = iCSBusiness.GetResultLoginDTOs(clientesDTO); } catch (Exception ex) { loginResponse.status.CodeResp = "01"; loginResponse.status.MessageResp = "Error en el Servicio"; Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN EL SERVICIO CustomerService:LoginCustomer " + ex.Message); throw ex; } return(loginResponse); }
public async Task<LoginDto> Get([FromUri] int id) { var request = new GetLoginRequest { Id = id }; return await _mediator.ExecuteAsync(request).ConfigureAwait(false); }
public GetLoginResponse GetLogin(GetLoginRequest GetLoginRequest) { GetLoginRequest1 inValue = new GetLoginRequest1(); inValue.GetLoginRequest = GetLoginRequest; GetLoginResponse1 retVal = ((LoginService)(this)).GetLogin(inValue); return(retVal.GetLoginResponse); }
public async Task <LoginDto> Get([FromUri] int id) { var request = new GetLoginRequest { Id = id }; return(await _mediator.ExecuteAsync(request).ConfigureAwait(false)); }
public async Task <ActionResult> LoginRequest([FromBody] GetLoginRequest request) { var IsAuthorized = await userService.IsAuthorized(request.User, request.Pass); if (IsAuthorized) { // base64 UTF8 (request.User:request.pass) var account = $"{request.User}:{request.Pass}"; var accountBytes = System.Text.Encoding.UTF8.GetBytes(account); var result = new { accessToken = Convert.ToBase64String(accountBytes) }; return(Ok(result)); } return(Unauthorized()); }
public LoginResponses GetLoginPhoneBooks(GetLoginRequest getLoginRequest) { try { using (var dbcontext = new PhoneBooksContext()) { var users = dbcontext.Logins.Where(user => user.Password.Equals(getLoginRequest.Password) && user.Username.Equals(getLoginRequest.Username)).FirstOrDefault(); return(new LoginResponses { Username = users.Username, Success = true, Message = string.Empty }); } } catch (Exception ex) { return(new LoginResponses { Username = string.Empty, Success = false, Message = ex.Message }); } }
public GetLoginRequest1(GetLoginRequest GetLoginRequest) { this.GetLoginRequest = GetLoginRequest; }
public LoginResponses GetUserLogin([FromBody] GetLoginRequest getLoginRequest) { var response = _services.GetLoginPhoneBooks(getLoginRequest); return(response); }