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:
- Get code for Facebook provider in
Katana
source code. - Change all "Facebook" to "Vkontakte" (just find&replace).
- Customize
[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?