public abstract static class XsrfCheck.AbstractLinkSubmission extends Object implements XsrfCheck.Submission
| Constructor and Description |
|---|
AbstractLinkSubmission() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getLink() |
void |
init(net.sourceforge.jwebunit.WebTester tester,
Navigation navigation,
Form form)
Initialise the submission with state from the checker.
|
void |
removeToken()
Removes the token from the state so that we can test what happens when a "dodgy token" is submitted to an
action that is expecting a good token.
|
void |
submitRequest()
Submits a request to an action that presumably is XSRF-protected and requires a token to be present.
|
com.meterware.httpunit.WebResponse |
submitRequest(String referer)
Submit a request with Referer header set to given value
Tester may be not updated with a response,
therefore this method returns response that may be used for assertions.
|
public void init(net.sourceforge.jwebunit.WebTester tester,
Navigation navigation,
Form form)
XsrfCheck.Submissioninit in interface XsrfCheck.Submissiontester - web testernavigation - navigationform - formpublic void removeToken()
throws Exception
XsrfCheck.SubmissionremoveToken in interface XsrfCheck.SubmissionException - epublic void submitRequest()
throws Exception
XsrfCheck.SubmissionsubmitRequest in interface XsrfCheck.SubmissionException - epublic com.meterware.httpunit.WebResponse submitRequest(String referer) throws Exception
XsrfCheck.Submission
Note: Origin header cannot be set due to an undocumented "feature" of
sun.net.www.protocol.http.HttpURLConnection, see allowRestrictedHeaders static field
in implementation for details.
submitRequest in interface XsrfCheck.SubmissionExceptionCopyright © 2002-2024 Atlassian. All Rights Reserved.