@ExportedBean public abstract class CrumbIssuer extends Object implements Describable<CrumbIssuer>, ExtensionPoint
| Modifier and Type | Class and Description |
|---|---|
static class |
CrumbIssuer.RestrictedApi |
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
CrumbIssuer() |
| Modifier and Type | Method and Description |
|---|---|
static DescriptorExtensionList<CrumbIssuer,Descriptor<CrumbIssuer>> |
all()
Returns all the registered
CrumbIssuer descriptors. |
Api |
getApi() |
String |
getCrumb()
Get a crumb value based on user specific information in the current request.
|
String |
getCrumb(javax.servlet.ServletRequest request)
Get a crumb value based on user specific information in the request.
|
String |
getCrumbRequestField()
Get the name of the request parameter the crumb will be stored in.
|
CrumbIssuerDescriptor<CrumbIssuer> |
getDescriptor()
Access global configuration for the crumb issuer.
|
static void |
initStaplerCrumbIssuer()
Sets up Stapler to use our crumb issuer.
|
protected abstract String |
issueCrumb(javax.servlet.ServletRequest request,
String salt)
Create a crumb value based on user specific information in the request.
|
boolean |
validateCrumb(javax.servlet.ServletRequest request)
Get a crumb from a request parameter and validate it against other data
in the current request.
|
boolean |
validateCrumb(javax.servlet.ServletRequest request,
MultipartFormDataParser parser)
Get a crumb from multipart form data and validate it against other data
in the current request.
|
abstract boolean |
validateCrumb(javax.servlet.ServletRequest request,
String salt,
String crumb)
Validate a previously created crumb against information in the current request.
|
@Exported public String getCrumbRequestField()
@Exported public String getCrumb()
public String getCrumb(javax.servlet.ServletRequest request)
request - protected abstract String issueCrumb(javax.servlet.ServletRequest request, String salt)
request - salt - public boolean validateCrumb(javax.servlet.ServletRequest request)
request - public boolean validateCrumb(javax.servlet.ServletRequest request,
MultipartFormDataParser parser)
request - parser - public abstract boolean validateCrumb(javax.servlet.ServletRequest request,
String salt,
String crumb)
request - salt - crumb - The previously generated crumb to validate against information in the current requestpublic CrumbIssuerDescriptor<CrumbIssuer> getDescriptor()
getDescriptor in interface Describable<CrumbIssuer>public static DescriptorExtensionList<CrumbIssuer,Descriptor<CrumbIssuer>> all()
CrumbIssuer descriptors.public Api getApi()
@Initializer public static void initStaplerCrumbIssuer()
Copyright © 2019. All rights reserved.