Exemplo n.º 1
0
        public void Does_return_APIKey_for_ApiKey_request_in_GlobalRequestFilters_Action()
        {
            RequiresAuthActionService.LastApiKey = null;

            var client = new JsonServiceClient(ListeningOn)
            {
                Credentials = new NetworkCredential(liveKey.Id, ""),
            };

            var request = new RequiresAuthAction {
                Name = "foo"
            };
            var response = client.Send(request);

            Assert.That(response.Name, Is.EqualTo(request.Name));

            Assert.That(RequiresAuthActionService.LastApiKey.Id, Is.EqualTo(liveKey.Id));
        }
Exemplo n.º 2
0
 public object Any(RequiresAuthAction request)
 {
     LastApiKey = base.Request.GetApiKey();
     return(request);
 }