Recommended Own Authentication Provider Implementation for Owin Authentication

I need to authenticate users through LinkedIn, Vkontakte and other social networks that do not yet have providers.

I was able to create my own authentication provider as follows:

  • Get the code for the Facebook provider in Katana source code.
  • Change all Facebook to Vkontakte (just find and replace).
  • Configure the [provider_name]AuthenticatedContext class, [provider_name]AuthenticationHandler.ApplyResponseChallengeAsync() and [provider_name]AuthenticationHandler.AuthenticateCoreAsync() .

Everything works well, but just interesting. A lot of code is duplicated without actual changes. Is there a way to use any standard material to create a custom provider, and not just copy files?

+7
authentication owin katana
source share
1 answer

Unfortunately not. I also created new providers for LinkedIn and Yahoo, and although I copied most of the code from the Katana project, each provider has few nuances, which means that you cannot use one code base for everyone.

By the way, you can check out LinkedIn and Yahoo providers at http://www.beabigrockstar.com/introducing-the-yahoo-linkedin-oauth-security-providers-for-owin/

+3
source share

All Articles