public void RegisterProvider(ProviderType providerType, string clientID, string clientSecret, string scope = null, NameValueCollection additionalParameters = null) { Provider provider = null; switch (providerType) { case ProviderType.Google: provider = new GoogleProvider(clientID, clientSecret, scope, additionalParameters); break; case ProviderType.Live: provider = new LiveProvider(clientID, clientSecret, scope, additionalParameters); break; case ProviderType.Facebook: provider = new FacebookProvider(clientID, clientSecret, scope, additionalParameters); break; case ProviderType.LinkedIn: provider = new LinkedInProvider(clientID, clientSecret, scope, additionalParameters); break; } if (provider == null) { throw new ArgumentException("Invalid provider type"); } providers[providerType] = provider; }
public void RegisterProvider(ProviderType providerType, string clientID, string clientSecret, string scope = null) { Provider provider = null; switch (providerType) { case ProviderType.Google: provider = new GoogleProvider(clientID, clientSecret, scope); break; case ProviderType.Live: provider = new LiveProvider(clientID, clientSecret, scope); break; case ProviderType.Facebook: provider = new FacebookProvider(clientID, clientSecret, scope); break; case ProviderType.LinkedIn: provider = new LinkedInProvider(clientID, clientSecret, scope); break; } if (provider == null) { throw new ArgumentException("Invalid provider type"); } providers[providerType] = provider; }
public void RegisterProvider(string providerType, string clientID, string clientSecret, string scope = null) { Provider provider = null; switch (providerType) { case ProviderType.Google: provider = new GoogleProvider(clientID, clientSecret, scope); break; case ProviderType.Live: provider = new LiveProvider(clientID, clientSecret, scope); break; case ProviderType.Facebook: provider = new FacebookProvider(clientID, clientSecret, scope); break; case ProviderType.LinkedIn: provider = new LinkedInProvider(clientID, clientSecret, scope); break; } RegisterProvider(provider); }