Class AuthenticationResponseCodeTest
- java.lang.Object
-
- org.apache.sling.launchpad.webapp.integrationtest.auth.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 Summary
Fields Modifier and Type Field Description org.junit.rules.TestRule
logRule
-
Constructor Summary
Constructors Constructor Description AuthenticationResponseCodeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
void
cleanup()
void
setup()
void
testPreventLoopIncorrectFormCredentials()
void
testPreventLoopIncorrectHttpBasicCredentials()
void
testValidatingCorrectFormCredentials()
void
testValidatingCorrectHttpBasicCredentials()
void
testValidatingIncorrectCookie()
void
testValidatingIncorrectCredentials()
void
testValidatingIncorrectHttpBasicCredentials()
void
testWithNonHtmlAcceptHeaderIncorrectCredentials()
void
testWithoutAcceptHeaderIncorrectCredentials()
void
testXRequestedWithIncorrectCredentials()
-
-
-
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
-
-