Reputation: 641
I need to authenticate users via LinkedIn, Vkontakte and other social networks that do not have providers yet.
I succeeded creating custom authentication provider in the following way:
Katana
source code.[provider_name]AuthenticatedContext
class, [provider_name]AuthenticationHandler.ApplyResponseChallengeAsync()
and [provider_name]AuthenticationHandler.AuthenticateCoreAsync()
.Everything works well, but just wondering. Much code is duplicated with no actual change. Is there a way to use any standard stuff for building custom provider, not just copying the files?
Upvotes: 7
Views: 3558
Reputation: 548
Unfortunately not. I also created new providers for LinkedIn and Yahoo and even though I copied much of the code from the Katana project there are little nuances with each provider which means you cannot really use a single code base for all.
BTW, you can check out the LinkedIn and Yahoo providers at http://www.beabigrockstar.com/introducing-the-yahoo-linkedin-oauth-security-providers-for-owin/
Upvotes: 3