public Policy GetPolicyById(string policyId)
        {
            var result = JSonResourceAsyncReader
                         .GetResourceAsync <RootPolicy>(this._resourceUrl, this._httpClient).Result.Policies
                         .Where(p => p.Id == policyId)
                         .FirstOrDefault();

            return(result);
        }
        public Client GetClientByName(string clientName)
        {
            var result = JSonResourceAsyncReader
                         .GetResourceAsync <RootClient>(this._resourceUrl, this._httpClient).Result.Clients
                         .Where(c => c.Name == clientName)
                         .FirstOrDefault();

            return(result);
        }
        public IList <Policy> GetPoliciesByClientId(string clientId)
        {
            var result = JSonResourceAsyncReader
                         .GetResourceAsync <RootPolicy>(this._resourceUrl, this._httpClient).Result.Policies
                         .Where(p => p.ClientId == clientId)
                         .ToList();

            return(result);
        }