Exemplo n.º 1
0
 public static X2chAuthenticator GetInstance()
 {
     if (authenticator.IsConnectNeeded())
     {
         authenticator.Connect(authenticator.loginId, authenticator.password);
     }
     return(authenticator);
 }
Exemplo n.º 2
0
        public static bool IsValidUsernamePassword(string username, string password)
        {
            if (String.IsNullOrEmpty(username) || String.IsNullOrEmpty(password))
            {
                return(false);
            }

            X2chAuthenticator test = new X2chAuthenticator();

            test.Connect(username, password);
            return(test.IsValidSessionId(test.SessionId));
        }