|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.functest.framework.security.xsrf.XsrfCheck
public class XsrfCheck
Class that makes xsrf related testing easier. Provide it with repeatable steps and it'll perform a test for both valid and invalid tokens
Nested Class Summary | |
---|---|
static class |
XsrfCheck.AbstractLinkSubmission
Abstract implementation of Submission for mutative actions accessed by links. |
static class |
XsrfCheck.AsynchFormSubmission
TODO: Document this class / interface here |
static class |
XsrfCheck.FormSubmission
Form-based submission |
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.XPathLinkSubmission
XPath based link submission. |
Field Summary | |
---|---|
static String |
ATL_TOKEN
|
static String |
XSRF_DEFAULT_ERROR
|
Constructor Summary | |
---|---|
XsrfCheck(String description,
XsrfCheck.Setup setup,
XsrfCheck.Submission submission)
|
Method Summary | |
---|---|
protected void |
init(FuncTestHelperFactory funcTestHelperFactory)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ATL_TOKEN
public static final String XSRF_DEFAULT_ERROR
Constructor Detail |
---|
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 submissionMethod Detail |
---|
protected void init(FuncTestHelperFactory funcTestHelperFactory)
public void run() throws Exception
Exception
public void run(String xsrfError) throws Exception
Exception
public static String invalidTokenInUrl(String original)
ATL_TOKEN
is
present as a parameter, this method will make its value invalid.
original
- the url string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |