Looking for Oauth Yahoo sample C# - c#

I know threre a lot of libraries dotnetopenauth,oauthbase, etc.
But i need sample of using with yahoo.
Samples,which i find did not work for me.Maybe you have example.Please share :-)
I find bug OauthBase work fine for me :-)

This
one, I found explained very well. And this one is from oAuth official site

Another solution is SocialAuth.NET
This library takes care of all token generation and handshake with Yahoo, Google, Facebook and MSN and expose methods like Login(), GetProfile() and GetContacts(). Infact it also provides option to use its inbuilt authentication engine using which a site with no authentication can be turned authentication enabled with these providers in less than 10 minutes.

Related

Open Authentication - provider

I hope someone can at least point me in the right direction here.
I have a need for Open Authentication in my business.
However it is not to use other services like facebook or google etc.
We have a membership database - a standard asp.net membership database (slightly modified with an additional table for profile information).
We also have multiple applications that our customers can use but require a log in, so we would like to use the membership database as an authentication source for these applications using open auth.
But i'm not sure where to start with it... everything i look at seems to point to using facebook or google etc as the source of authentication.
Where do I start with being the provider for open auth?
Any recommendations? Any advice for a newbie to open auth?
Our website is webforms, not mvc and runs on .net 4.0.
Thank you in advance!
Try to look at Thinktecture IdentityServer v2. It is an IAM that handles authentication. It is customizable. With little coding you can wire your membership database with it. See this page and IdentityServer wiki for more info.
You should start looking at the code from DotNetopenAuth, particularly the Samples. This is should give you enough to get started with OAuth and/or Open ID.
Particurlarly, look at this sample, as this uses OAuth2 to protect a web api, which can be used a starting point to something that can be used by clients in a very similar way to facebook or google logins.

Alternatives to Google Libraries/DotNetOpenAuth for Google OAuth2

I'm looking for the easiest way to authenticate against google oAuth 2.0 implementation for the purpose of accessing the google Drive API. These are the constraints:
It has to be .NET 2.0 compatible
Can not use the google libraries
I'll be using a service account to do work on behalf of specific users
I've looked at DotNetOpenAuth, but the version for the .NET 2.0 runtime doesn't seem to support oAuth 2.0 (google has deprecated oAuth v1, which DNOA supports, of course).
Google's documentation is confusing, at best (witholding explitives here).
Not sure if this will help but the since you mentioned direct JSON, XML, etc. Google has a UI that simulates and generates requests as well as provides some limited documentation that might get you started on creating such code:
https://developers.google.com/apis-explorer/#p/
https://developers.google.com/oauthplayground/
The following provides some additional info on the login:
https://developers.google.com/accounts/docs/OAuth2Login
Far from exhaustive but it's a start if that's your angle.

Building an OAuth provider for custom API

I would like to use oAuth as a system to allow developers access to my API but not require them to pass through the login information.
There does not seem to be any good how-to's or blogs on this topic. Everything I have found is based on consuming an oAuth system such as Facebook or twitter. Wondering if anyone has any links to good instructions or libraries that could get me started. If there are no examples out there perhaps someone could consider writing one, the community really needs it.
Using OAuth to login is actually a side-effect, not the main goal of the protocol. The best place to start with providing an OAuth-protected API is the protocol specification and since this is a new service, you should take a look at OAuth 2.0 1. It is pretty much done and ready for deployment.
To implement OAuth 2.0 you will need to make a few important decisions about which features you are going to support and your scaling needs. There are also a lot of security considerations to go through. I would suggest you start with supporting the authorization code and implicit grant types.
I would look into DotNetOpenAuth. It should work for your needs, but I've only used it for the OpenID stuff.

Multiple authentication providers in ASP.NET MVC

I'm starting a new project, using ASP.NET MVC 3, and one requirement is to support multiple authentication providers, i.e. Live ID, Google, Facebook, etc. I've looked at companies that provide such a service, but ideally I need a free solution.
Does anyone know of a free service?
If not, the only other solution is to develop something similar to support the providers I'm interest in. Has anyone implemented such a thing? If so, can someone provide any suggestions, articles, guidence, etc, to help with this?
I don't think there is an open source library that supports all the sites out there. You may take a look at OpenId for those that support this protocol. For FaceBook you could use the Graph API.
Jainrain Engage is free for their basic accounts.
Whilst not free the Windows Azure Access Control Service provides just that
You use Windows Identity Foundation in your website to point at the ACS, and configure the ACS with Live ID, Google, Yahoo ID and/or Facebook (as well as potentially any other STS)

OAuth Simple Service Provider

I am struggling trying to pick apart the OAuth Service Provider example which is included in DotNetOpenAuth. I searched SO and found a few similar/related posts, but nothing really useful. Is there any open-source project or really simple/primitive example of an ASP.NET MVC 2 OAuth Service Provider? All I want to use OAuth for is authentication of the service. I was going to roll my own api with a key/secret, but thought a tried and tested protocol like OAuth would probably be a better solution.
I ended up doing some extensive research to find that I didn't need the traditional 3-legged OAuth and only needed 2-legged. The problem is 2-legged OAuth information is pretty hard to find. I finally found an Google spec for implementing 2-legged OAuth:
http://oauth.googlecode.com/svn/spec/ext/consumer_request/1.0/drafts/2/spec.html
I also found an implementation of it, as Justin.tv is using it for their services:
http://apiwiki.justin.tv/mediawiki/index.php/OAuth_Ruby_Tutorial
I also stumbled across an excellent OAuth testing tool which helped me greatly in implementing the service:
http://term.ie/oauth/example/client.php
2-legged OAuth is pretty simple once you understand what you are looking for and how to implement it. If you're searching for OAuth, most likely you are finding articles talking about the traditional 3-legged OAuth which involves 3-parties as the name implies: consumers, service providers, AND users. Two-legged strictly involves consumers and service providers. If you're service does not deal with users specifically, 2-legged OAuth is just what you're looking for.
As for a framework, I am using ASP.NET MVC so I ended up settling on a github repository located here:
https://github.com/buildmaster/oauth-mvc.net
Its got some really nice, clean code, and uses dependency injection (Ninject). It didn't take much for me to be able to modify it for 2-legged OAuth.

Categories