title: How do I add authToken for "Trigger builds remotely" to job's config.xml
body: <p>I want to enable the "Trigger builds remotely" option for a Jenkins job, with an authentication token defined. I tried this:</p>
  
  <pre><code>freeStyleJob('Sandbox/test-trigger') {
      configure { project -&gt;
        (project / 'authToken').setValue('mytoken')
      }
  }
  </code></pre>
  
  <p>According to <a href="http://job-dsl.herokuapp.com/" rel="nofollow noreferrer">http://job-dsl.herokuapp.com/</a>, I end up with an authToken line on the top level of the project's config XML (as desired):</p>
  
  <pre><code>&lt;project&gt;
      [...]
      &lt;authToken&gt;mytoken&lt;/authToken&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>However, after running the Job-DSL, I do not get the authToken defined in the resulting XML, nor is the option enabled in the config.
  Any ideas what I'm doing wrong?</p>
  
  <p>Using Jenkins 1.609.2 with job-dsl 1.37.</p>
  
  <p>UPDATE: job-dsl >= 1.39 now supports the token setting; see <a href="https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.FreeStyleJob.authenticationToken" rel="nofollow noreferrer">https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.FreeStyleJob.authenticationToken</a></p>