public async Task <Customer> AuthenticateCustomer(AuthenticateCustomer customer)
        {
            var message = new HttpRequestBuilder(OcelotApiGatewayAddress)
                          .SetPath("/customer")
                          .AddToPath("authenticate")
                          .HttpMethod(HttpMethod.Post)
                          .GetHttpMessage();

            var json = JsonConvert.SerializeObject(customer);

            message.Content = new StringContent(json, Encoding.UTF8, "application/json");

            return(await SendRequest <Customer>(message));
        }
        public async Task <IActionResult> Login([FromForm] AuthenticateCustomer customer)
        {
            if (ModelState.IsValid)
            {
                var authenticatedCustomer = await _customerManagementApiClient.AuthenticateCustomer(customer);

                HttpContext.Session.SetString("JWTToken", authenticatedCustomer.Token);
                if (!string.IsNullOrEmpty(authenticatedCustomer?.Token))
                {
                    HttpContext.Session.SetString("LoggedInUserFirstName", authenticatedCustomer.FirstName);
                }

                return(RedirectToAction("", "Home"));
            }
            else
            {
                return(View("Login", customer));
            }
        }