code: public void validateCrumb(StaplerRequest request, String submittedCrumb) {
          if (!issueCrumb(request).equals(submittedCrumb)) {
              throw new SecurityException("Request failed to pass the crumb test (try clearing your cookies)");
          }
      }
docs: Validates a crumb that was submitted along with the request.
  
  @param request
  The request that submitted the crumb
  @param submittedCrumb
  The submitted crumb value to be validated.
  
  @throws SecurityException
  If the crumb doesn't match and the request processing should abort.