Can't find OAuth1Authenticator

102 views
Skip to first unread message

Sam Wessel

unread,
May 17, 2012, 8:05:00 AM5/17/12
to RestSharp
Hi,

I'm following the examples in RestSharp.IntegrationTests/
oAuth1Tests.cs in order to integrate with parts of the Twitter API
that require authentication.

However, I can't find the OAuth1Authenticator class! I added RestSharp
using nuget and have been otherwise working with it very successfully
up until now.

I just thought I'd ask the question before I replace the nuget package
with the code I'm looking at on github, in case anyone could help me
figure out what's going on, or why I can't see the class.

Many thanks,

Sam

Dev@Work

unread,
May 17, 2012, 8:11:57 AM5/17/12
to RestSharp
Hi Sam,

My guess is cproj is targeting the 4.0 runtime version.

The 4.0 build is missing some files, this is fixed already but is not
released yet. See https://github.com/restsharp/RestSharp/pull/273 for
details.

You could either:
A. Change the target runtime to 3.5.
B. Checkout the master branch of RestSharp and compile it yourself.
C. Wait for the fix to be released.

Regards,
Bert

Sam Wessel

unread,
May 17, 2012, 9:09:53 AM5/17/12
to RestSharp
Awesome,

Thanks Bert.

Lewis

unread,
Jun 21, 2012, 5:51:21 AM6/21/12
to rest...@googlegroups.com
I had this issue too ! You can still target 4.0 and fetching the OAuth1Authenticator.cs class by typing this (see the bold part) :

client.Authenticator = RestSharp.Authenticators.OAuth1Authenticator.ForRequestToken(consumerKey, consumerSecret);

hope it helps
Lewis
Reply all
Reply to author
Forward
0 new messages