Пример #1
0
        public void HmacSha1AuthenticatedRequestParametersShouldBeEchoed()
        {
            RequestAuthenticator authenticator = RequestAuthenticatorFactory.GetHmacSha1Authenticator(credentials, accessToken);

            WebRequest req = WebRequest.Create("http://term.ie/oauth/example/echo_api.php?method=foo&bar=baz");

            authenticator.SignRequest(req);

            string response = Helpers.ReadResponse(req);

            Assert.That(response, Contains.Substring("method=foo&bar=baz"));
        }
Пример #2
0
        public void RetrieveTimelineUsingHmacSha1Signature()
        {
            RequestAuthenticator authenticator = RequestAuthenticatorFactory.GetHmacSha1Authenticator(credentials, accessToken);

            WebRequest req = WebRequest.Create("https://api.twitter.com/1/statuses/home_timeline.json?include_entities=true");

            authenticator.SignRequest(req);

            string response = Helpers.ReadResponse(req);

            Assert.That(response, Contains.Substring("entities"));
        }
Пример #3
0
 public void RetrieveAcccountMetadataUsingHmacSha1Signature()
 {
     RetrieveAccountMetadataUsing(RequestAuthenticatorFactory.GetHmacSha1Authenticator(credentials, accessToken));
 }