Inheritance: BrockAllen.OAuth2.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);
        }
        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 LinkedInProvider(string clientID, string clientSecret, string scope, NameValueCollection additionalParams = null)
     : base(ProviderType.LinkedIn,
            "https://www.linkedin.com/uas/oauth2/authorization",
            "https://www.linkedin.com/uas/oauth2/accessToken",
            "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url,formatted-name,location:(country:(code)),public-profile-url)",
            clientID, clientSecret, "oauth2_access_token", LinkedInProvider.AdditionalParameters(additionalParams))
 {
     if (scope == null)
     {
         Scope = "r_fullprofile r_emailaddress";
     }
     else
     {
         Scope = scope;
     }
 }