Class TestCrumbIssuer

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

public class TestCrumbIssuer extends hudson.security.csrf.CrumbIssuer
A crumb issuer that issues a constant crumb value. Used for unit testing.
Author:
dty
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     

    Nested classes/interfaces inherited from class hudson.security.csrf.CrumbIssuer

    hudson.security.csrf.CrumbIssuer.RestrictedApi

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Field Summary

    Fields inherited from class hudson.security.csrf.CrumbIssuer

    DEFAULT_CRUMB_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    issueCrumb(jakarta.servlet.ServletRequest request, String salt)
     
    boolean
    validateCrumb(jakarta.servlet.ServletRequest request, String salt, String crumb)
     

    Methods inherited from class hudson.security.csrf.CrumbIssuer

    all, getApi, getCrumb, getCrumb, getCrumb, getCrumbRequestField, getDescriptor, initStaplerCrumbIssuer, issueCrumb, validateCrumb, validateCrumb, validateCrumb, validateCrumb

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestCrumbIssuer

      @DataBoundConstructor public TestCrumbIssuer()
  • Method Details

    • issueCrumb

      protected String issueCrumb(jakarta.servlet.ServletRequest request, String salt)
      Overrides:
      issueCrumb in class hudson.security.csrf.CrumbIssuer
    • validateCrumb

      public boolean validateCrumb(jakarta.servlet.ServletRequest request, String salt, String crumb)
      Overrides:
      validateCrumb in class hudson.security.csrf.CrumbIssuer