org.jvnet.hudson.test
Class TestCrumbIssuer

java.lang.Object
  extended by hudson.security.csrf.CrumbIssuer
      extended by org.jvnet.hudson.test.TestCrumbIssuer
All Implemented Interfaces:
ExtensionPoint, Describable<CrumbIssuer>

public class TestCrumbIssuer
extends CrumbIssuer

A crumb issuer that issues a constant crumb value. Used for unit testing.

Author:
dty

Nested Class Summary
static class TestCrumbIssuer.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.security.csrf.CrumbIssuer
CrumbIssuer.RestrictedApi
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
TestCrumbIssuer()
           
 
Method Summary
protected  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, String salt, String crumb)
          Validate a previously created crumb against information in the current request.
 
Methods inherited from class hudson.security.csrf.CrumbIssuer
all, getApi, getCrumb, getCrumb, getCrumbRequestField, getDescriptor, initStaplerCrumbIssuer, validateCrumb, validateCrumb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCrumbIssuer

public TestCrumbIssuer()
Method Detail

issueCrumb

protected String issueCrumb(javax.servlet.ServletRequest request,
                            String salt)
Description copied from class: CrumbIssuer
Create a crumb value based on user specific information in the request. The crumb should be generated by building a cryptographic hash of:

Specified by:
issueCrumb in class CrumbIssuer
Returns:

validateCrumb

public boolean validateCrumb(javax.servlet.ServletRequest request,
                             String salt,
                             String crumb)
Description copied from class: CrumbIssuer
Validate a previously created crumb against information in the current request.

Specified by:
validateCrumb in class CrumbIssuer
crumb - The previously generated crumb to validate against information in the current request
Returns:


Copyright © 2004-2013. All Rights Reserved.