/// <summary>
        /// Returns the named IAuthenticationProvider instance. Guaranteed to return an initialized IAuthenticationProvider if no exception thrown.
        /// </summary>
        /// <param name="authenticationProvider">Name defined in configuration for the authentication provider to instantiate</param>
        /// <returns><see cref="IAuthenticationProvider"></see> created through configuration</returns>
        /// <exception cref="ArgumentNullException">providerName is null</exception>
        /// <exception cref="ArgumentException">providerName is empty</exception>
        /// <exception cref="ConfigurationException">Could not find instance specified in providerName</exception>
        /// <exception cref="InvalidOperationException">Error processing configuration information defined in application configuration file.</exception>
        public static IAuthenticationProvider GetAuthenticationProvider(string authenticationProvider)
        {
            AuthenticationProviderFactory factory = new AuthenticationProviderFactory(ConfigurationManager.GetCurrentContext());

            return(factory.GetAuthenticationProvider(authenticationProvider));
        }
 /// <summary>
 /// Returns the named IAuthenticationProvider instance. Guaranteed to return an initialized IAuthenticationProvider if no exception thrown.
 /// </summary>
 /// <param name="authenticationProvider">Name defined in configuration for the authentication provider to instantiate</param>
 /// <returns><see cref="IAuthenticationProvider"></see> created through configuration</returns>
 /// <exception cref="ArgumentNullException">providerName is null</exception>
 /// <exception cref="ArgumentException">providerName is empty</exception>
 /// <exception cref="ConfigurationException">Could not find instance specified in providerName</exception>
 /// <exception cref="InvalidOperationException">Error processing configuration information defined in application configuration file.</exception>
 public static IAuthenticationProvider GetAuthenticationProvider(string authenticationProvider)
 {
     AuthenticationProviderFactory factory = new AuthenticationProviderFactory(ConfigurationManager.GetCurrentContext());
     return factory.GetAuthenticationProvider(authenticationProvider);
 }