Ejemplo n.º 1
0
        public void TestBasicAuthFailsWithMissingHeader()
        {
            var header         = "";
            var username       = "******";
            var hashedPassword = "******";

            Assert.IsFalse(AbstractHttpHandler.CheckAuthHeader(header, username, hashedPassword));
        }
Ejemplo n.º 2
0
        public void TestBasicAuthFailsWithInvalidUser()
        {
            var header         = "Basic Zm9vOmJhcg==";
            var username       = "******";
            var hashedPassword = "******";

            Assert.IsFalse(
                AbstractHttpHandler.CheckAuthHeader(header, username, hashedPassword)
                );
        }
Ejemplo n.º 3
0
        public void TestBasicAuthSucceedsWithEmptyPassword()
        {
            var header         = "Basic Zm9v";
            var username       = "******";
            var hashedPassword = "";

            Assert.IsTrue(
                AbstractHttpHandler.CheckAuthHeader(header, username, hashedPassword)
                );
        }
Ejemplo n.º 4
0
        public void TestBasicAuthSucceedsWithNoUsernameConfigured()
        {
            var header         = "";
            var username       = "";
            var hashedPassword = "";

            Assert.IsTrue(
                AbstractHttpHandler.CheckAuthHeader(header, username, hashedPassword)
                );
        }
Ejemplo n.º 5
0
        public void TestBasicAuthSucceedsWithValidUserAndPassword()
        {
            var header         = "Basic Zm9vOmJhcg==";
            var username       = "******";
            var hashedPassword = "******";

            Assert.IsTrue(
                AbstractHttpHandler.CheckAuthHeader(header, username, hashedPassword)
                );
        }