Class AuthenticationResponseCodeTest


  • public class AuthenticationResponseCodeTest
    extends Object
    Test of the response code from an authentication request depending on various request parameters and headers including j_validate, Ajax detection, and non-browser client detection.
    • Field Detail

      • logRule

        public org.junit.rules.TestRule logRule
    • Constructor Detail

      • AuthenticationResponseCodeTest

        public AuthenticationResponseCodeTest()
    • Method Detail

      • testValidatingCorrectFormCredentials

        public void testValidatingCorrectFormCredentials()
                                                  throws Exception
        Throws:
        Exception
      • testValidatingCorrectHttpBasicCredentials

        public void testValidatingCorrectHttpBasicCredentials()
                                                       throws Exception
        Throws:
        Exception
      • testValidatingIncorrectCredentials

        public void testValidatingIncorrectCredentials()
                                                throws Exception
        Throws:
        Exception
      • testValidatingIncorrectCookie

        public void testValidatingIncorrectCookie()
                                           throws Exception
        Throws:
        Exception
      • testValidatingIncorrectHttpBasicCredentials

        public void testValidatingIncorrectHttpBasicCredentials()
                                                         throws Exception
        Throws:
        Exception
      • testPreventLoopIncorrectHttpBasicCredentials

        public void testPreventLoopIncorrectHttpBasicCredentials()
                                                          throws Exception
        Throws:
        Exception
      • testPreventLoopIncorrectFormCredentials

        public void testPreventLoopIncorrectFormCredentials()
                                                     throws Exception
        Throws:
        Exception
      • testXRequestedWithIncorrectCredentials

        public void testXRequestedWithIncorrectCredentials()
                                                    throws Exception
        Throws:
        Exception
      • testWithoutAcceptHeaderIncorrectCredentials

        public void testWithoutAcceptHeaderIncorrectCredentials()
                                                         throws Exception
        Throws:
        Exception
      • testWithNonHtmlAcceptHeaderIncorrectCredentials

        public void testWithNonHtmlAcceptHeaderIncorrectCredentials()
                                                             throws Exception
        Throws:
        Exception
      • assertPostStatus

        protected org.apache.commons.httpclient.HttpMethod assertPostStatus​(String url,
                                                                            int expectedStatusCode,
                                                                            List<org.apache.commons.httpclient.NameValuePair> postParams,
                                                                            List<org.apache.commons.httpclient.Header> headers,
                                                                            String assertMessage)
                                                                     throws IOException
        Throws:
        IOException