Class JenkinsCrumb
java.lang.Object
org.jenkinsci.plugins.ParameterizedRemoteTrigger.JenkinsCrumb
If the remote Jenkins server uses the "Prevent Cross Site Request Forgery exploits" security option,
a CSRF protection token must be sent in the header of the request to trigger the remote job.
This token is called crumb.
-
Constructor Summary
ConstructorDescriptionNew JenkinsCrumb object indicating that CSRF is disabled in the remote Jenkins (no crumb needed).JenkinsCrumb
(String headerId, String crumbValue) New JenkinsCrumb object with the header ID and crumb value to use in subsequent requests. -
Method Summary
Modifier and TypeMethodDescriptionboolean
-
Constructor Details
-
JenkinsCrumb
public JenkinsCrumb()New JenkinsCrumb object indicating that CSRF is disabled in the remote Jenkins (no crumb needed). -
JenkinsCrumb
New JenkinsCrumb object with the header ID and crumb value to use in subsequent requests.- Parameters:
headerId
- the header ID to be used in the subsequent requests.crumbValue
- the crumb value to be used in the header of subsequent requests.
-
-
Method Details
-
getHeaderId
- Returns:
- the header ID to be used in the subsequent requests. Null if CSRF is disabled in the remote Jenkins.
-
getCrumbValue
- Returns:
- the crumb value to be used in the header of subsequent requests. Null if CSRF is disabled in the remote Jenkins.
-
isEnabledOnRemote
public boolean isEnabledOnRemote()- Returns:
- true if CSRF is enabled on the remote Jenkins, false otherwise.
-