Exemplo n.º 1
0
 /// <summary>
 /// Create an instance of the Authentication-Plugin.
 /// </summary>
 /// <param name="authPluginClassName"> name of the Authentication-Plugin you want to use </param>
 /// <param name="authParams">          map which represents parameters for the Authentication-Plugin </param>
 /// <returns> instance of the Authentication-Plugin </returns>
 /// <exception cref="UnsupportedAuthenticationException"> </exception>
 public static IAuthentication Create(string authPluginClassName, IDictionary <string, string> authParams)
 {
     try
     {
         return(DefaultImplementation.CreateAuthentication(authPluginClassName, authParams));
     }
     catch (System.Exception t)
     {
         throw new UnsupportedAuthenticationException(t.ToString());
     }
 }
Exemplo n.º 2
0
        // CHECKSTYLE.ON: MethodName

        /// <summary>
        /// Create an instance of the <seealso cref="Authentication"/> object by using
        /// the plugin class name.
        /// </summary>
        /// <param name="authPluginClassName">
        ///            name of the Authentication-Plugin you want to use </param>
        /// <param name="authParamsString">
        ///            string which represents parameters for the Authentication-Plugin, e.g., "key1:val1,key2:val2" </param>
        /// <returns> instance of the Authentication object </returns>
        /// <exception cref="UnsupportedAuthenticationException"> </exception>
        public static IAuthentication Create(string authPluginClassName, string authParamsString)
        {
            try
            {
                return(DefaultImplementation.CreateAuthentication(authPluginClassName, authParamsString));
            }
            catch (System.Exception t)
            {
                throw new UnsupportedAuthenticationException(t.Message);
            }
        }