title: authentication with http header in pyramid
body: <p>I've been looking for a way to authenticate user by user and password passed in http header.</p>
  
  <pre><code>curl --user user1:pass1 http://localhost:6543/the_resource
  </code></pre>
  
  <p>The idea is to check if passed credentials allow user to view *the_resource* and if not return 401 - Forbidden.</p>
  
  <p>I've found only examples of authentication policy where there has to be a login and logout view or <a href="http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/auth/basic.html" rel="nofollow">this basic authentication policy</a> which I don't know how to bind with Pyramid's ACL. </p>
  
  <p>I will appreciate any help, how to start.</p>
  
  <p>One more thing came to my mind. How to force this pup-up login window for basic authentication?</p>