public class XsrfCheck extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XsrfCheck.AbstractFormSubmission
Base class for form-based submission
|
static class |
XsrfCheck.AbstractLinkSubmission
Abstract implementation of Submission for mutative actions accessed by links.
|
static class |
XsrfCheck.CssLocatorLinkSubmission
XPath based link submission.
|
static class |
XsrfCheck.FormSubmission
Form-based submission by name
|
static class |
XsrfCheck.FormSubmissionWithId
Form-based submission by id
|
static class |
XsrfCheck.LinkWithIdSubmission
Id-based link submission
|
static class |
XsrfCheck.LinkWithTextSubmission
Name-based link submission
|
static interface |
XsrfCheck.Setup
Used to define the steps to perform before sending a request with a valid / invalid token
|
static interface |
XsrfCheck.Submission
Used to define the implementation of removing a token from a request and sending a request
|
static class |
XsrfCheck.SuppliedLinkSubmission
Static link submission
|
static class |
XsrfCheck.XPathLinkSubmission
XPath based link submission.
|
Modifier and Type | Field and Description |
---|---|
static String |
ATL_TOKEN |
static String |
CODE_403_DEFAULT_ERROR |
static String |
XSRF_DEFAULT_ERROR |
Constructor and Description |
---|
XsrfCheck(String description,
XsrfCheck.Setup setup,
XsrfCheck.Submission submission) |
Modifier and Type | Method and Description |
---|---|
protected void |
init(net.sourceforge.jwebunit.WebTester tester,
Navigation navigation,
Form form) |
static String |
invalidTokenInUrl(String original)
Given a url string, if the
ATL_TOKEN is
present as a parameter, this method will make its value invalid. |
void |
run() |
void |
run(String xsrfError,
String code403Error) |
public static final String ATL_TOKEN
public static final String XSRF_DEFAULT_ERROR
public static final String CODE_403_DEFAULT_ERROR
public XsrfCheck(String description, XsrfCheck.Setup setup, XsrfCheck.Submission submission)
description
- Description of testcasesetup
- The steps to perform before sending a request with a valid / invalid tokensubmission
- The submission implementation - eg Link or Form based submissionprotected void init(net.sourceforge.jwebunit.WebTester tester, Navigation navigation, Form form)
Copyright © 2002-2023 Atlassian. All Rights Reserved.