Beispiel #1
0
        public void TestLogin()
        {
            GateKeeperProvider currentProvider = (GateKeeperProvider)Membership.Provider;
            string             u;
            string             p;

            HarperACL.Authenticator     auth;
            SupportClasses.BaseResponse baseResponse;
            //u = "ut91";

            //u = "*****@*****.**";
            //p = "gilman10";
            //u = "premier1";
            //p = "@ndrew11";
            //u = "*****@*****.**";
            //p = "ledwards2011";
            //u = "mcoupland";
            //p = "testing123";
            //u = "testuser0001";
            //p = "testuser0001";
            //u = "aklein";
            //p = "aklein2011";
            //u = "kdicker";
            //p = "testing123";
            //u = "trademarkmedia";
            //p = "4eFr2cHE";
            //u = "cms_jmoon";
            //p = "andrewharper10";
            //u = "janebooz";
            //p = "october";
            //u = "*****@*****.**";
            //p = "marchbanks";
            //u = "*****@*****.**";            //p = "testing123";
            u            = "mcoupland";
            p            = "img";
            p            = HarperCRYPTO.Cryptography.Hash(p, true);
            auth         = new HarperACL.Authenticator(u, p, true, true, false);
            baseResponse = auth.Login();

            SecureServices.SecureServices client    = new Tests.SecureServices.SecureServices();
            SecureServices.BaseResponse   bresponse = client.Login(u, p, string.Empty, string.Empty);
            if (bresponse.TypedResponse != null &&
                bresponse.TypedResponse.Success &&
                (bresponse.TypedResponse as SecureServices.LoginResponse).Authenticated)
            {
                Assert.AreEqual(true, true);
            }
        }
Beispiel #2
0
        public void TestAllLogins()
        {
            int good = 0;
            int bad  = 0;
            GateKeeperProvider currentProvider = (GateKeeperProvider)Membership.Provider;
            string             u;
            string             p;

            HarperACL.Authenticator     auth;
            SupportClasses.BaseResponse baseResponse;
            List <HarperACL.Customer>   customers;

            using (HarperACL.ACLDataDataContext context = new HarperACL.ACLDataDataContext(ConfigurationManager.ConnectionStrings["AHT_MainConnectionString"].ConnectionString))
            {
                customers = (from a in context.Customers
                             join b in context.NetMemberships
                             on a.cusID equals b.cusID
                             where a.cusUserName != null &&
                             b.nmbDateEnd >= DateTime.Now &&
                             a.cusFirstName == "" &&
                             a.cusLastName == ""
                             select a).ToList();
            }
            foreach (HarperACL.Customer customer in customers)
            {
                u            = customer.cusUserName;
                p            = currentProvider.GetPassword(u, "");
                p            = HarperCRYPTO.Cryptography.EncryptData(p);
                auth         = new HarperACL.Authenticator(u, p, false, false, false);
                baseResponse = auth.Login();
                if (baseResponse.TypedResponse != null &&
                    baseResponse.TypedResponse.Success &&
                    (baseResponse.TypedResponse as SupportClasses.LoginResponse).Authenticated)
                {
                    good++;
                }
                else
                {
                    bad++;
                }
                System.Threading.Thread.Sleep(10);
            }
            Assert.AreEqual(true, true);
        }
Beispiel #3
0
        public void TestLogin()
        {
            GateKeeperProvider currentProvider = (GateKeeperProvider)Membership.Provider;
            string u;
            string p;
            HarperACL.Authenticator auth;
            SupportClasses.BaseResponse baseResponse;
            //u = "ut91";

            //u = "*****@*****.**";
            //p = "gilman10";
            //u = "premier1";
            //p = "@ndrew11";
            //u = "*****@*****.**";
            //p = "ledwards2011";
            //u = "mcoupland";
            //p = "testing123";
            //u = "testuser0001";
            //p = "testuser0001";
            //u = "aklein";
            //p = "aklein2011";
            //u = "kdicker";
            //p = "testing123";
            //u = "trademarkmedia";
            //p = "4eFr2cHE";
            //u = "cms_jmoon";
            //p = "andrewharper10";
            //u = "janebooz";
            //p = "october";
            //u = "*****@*****.**";
            //p = "marchbanks";
            //u = "*****@*****.**";            //p = "testing123";
            u = "mcoupland";
            p = "img";
            p = HarperCRYPTO.Cryptography.Hash(p, true);
            auth = new HarperACL.Authenticator(u, p, true, true, false);
            baseResponse = auth.Login();

            SecureServices.SecureServices client = new Tests.SecureServices.SecureServices();
            SecureServices.BaseResponse bresponse = client.Login(u, p, string.Empty, string.Empty);
            if (bresponse.TypedResponse != null
                && bresponse.TypedResponse.Success
                && (bresponse.TypedResponse as SecureServices.LoginResponse).Authenticated)
            {
                Assert.AreEqual(true, true);
            }
        }
Beispiel #4
0
 public void TestAllLogins()
 {
     int good = 0;
     int bad = 0;
     GateKeeperProvider currentProvider = (GateKeeperProvider)Membership.Provider;
     string u;
     string p;
     HarperACL.Authenticator auth;
     SupportClasses.BaseResponse baseResponse;
     List<HarperACL.Customer> customers;
     using (HarperACL.ACLDataDataContext context = new HarperACL.ACLDataDataContext(ConfigurationManager.ConnectionStrings["AHT_MainConnectionString"].ConnectionString))
     {
         customers = (from a in context.Customers
                      join b in context.NetMemberships
                      on a.cusID equals b.cusID
                      where a.cusUserName != null
                      && b.nmbDateEnd >= DateTime.Now
                      && a.cusFirstName == ""
                      && a.cusLastName == ""
                      select a).ToList();
     }
     foreach (HarperACL.Customer customer in customers)
     {
         u = customer.cusUserName;
         p = currentProvider.GetPassword(u, "");
         p = HarperCRYPTO.Cryptography.EncryptData(p);
         auth = new HarperACL.Authenticator(u, p, false, false, false);
         baseResponse = auth.Login();
         if (baseResponse.TypedResponse != null
             && baseResponse.TypedResponse.Success
             && (baseResponse.TypedResponse as SupportClasses.LoginResponse).Authenticated)
         {
             good++;
         }
         else
         {
             bad++;
         }
         System.Threading.Thread.Sleep(10);
     }
     Assert.AreEqual(true, true);
 }