title: htaccess authentication rest api methods
body: <p>I have REST API service built using CakePHP and I need to protect some of my methods using http authentication. For example I have methods like:</p>
  
  <pre><code>POST /api/store
  {
     name: "John",
     surname: "Johnny",
     ...
  }
  </code></pre>
  
  <p>and I want to protect this particular path (/api/store) to protect with http authentication to call cron job</p>
  
  <pre><code>http://username:password@server.com/api/store
  </code></pre>
  
  <p>is sth like that possible? If so, then how? Thank you!</p>