Ian1971
Ian1971

Reputation: 3706

Two-legged oauth with dotnetopenauth 4.0 problems

I've seen this Two legged OAuth using DotNetOpenAuth but it doesn't provide any details on how to remove one of the legs.

I am finding the code quite hard get my head around (using DotNetOpenAuth 4.0). Can anyone give me any pointers on how to modify the samples to do a two-legged auth?

Upvotes: 0

Views: 1253

Answers (2)

Pedro
Pedro

Reputation: 3781

Take a look at this post, it explains how to implement a 2 Legged OAuth using DotNetOpenAuth 4 with a Google Apps consumer key + secret.

Google Calendar V3 2 Legged authentication fails

Hope it will helps you :)

Upvotes: 1

Andrew Arnott
Andrew Arnott

Reputation: 81801

From the service provider, it is a simple matter of authorizing the request token immediately before before returning what normally is an unauthorized request token. Since the service provider already has to provide code to generate and store request tokens, this should be straightforward.

From the consumer, it's simply that you skip the redirect step. There's a sample of this in the OAuthConsumer samples' GoogleApps2Legged.aspx code-behind.

Upvotes: 3

Related Questions