public AppointmentsAPI(HttpClient httpClient, IJsonWebTokenService jsonWebTokenService)
        {
            var token = jsonWebTokenService.Create();

            httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
            client = RestService.For <IAppointmentsAPI>(httpClient);
        }
        public IResult Login()
        {
            var jsonWebTokenResult = _jsonWebTokenService
                                     .Create(new List <Claim> {
                new Claim(ClaimTypes.Name, "Carlos"), new Claim(ClaimTypes.Email, "*****@*****.**")
            });

            return(Result <CreateJsonWebTokenResult> .Ok(jsonWebTokenResult));
        }