|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.security.csrf.CrumbIssuer
@ExportedBean public abstract class CrumbIssuer
A CrumbIssuer represents an algorithm to generate a nonce value, known as a crumb, to counter cross site request forgery exploits. Crumbs are typically hashes incorporating information that uniquely identifies an agent that sends a request, along with a guarded secret so that the crumb value cannot be forged by a third party.
http://en.wikipedia.org/wiki/XSRF
Nested Class Summary | |
---|---|
static class |
CrumbIssuer.RestrictedApi
|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Constructor Summary | |
---|---|
CrumbIssuer()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CrumbIssuer()
Method Detail |
---|
@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 request
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |