title: OWIN-hosted Nancy Module Calling RequiresAuthentication sends back 401
body: <p>I have a Nancy module like this.</p>
  
  <pre><code>public class HomeModule : NancyModule
  {
      public HomeModule()
      {
          this.RequiresAuthentication();
  
          var context = this.Context; // this is null
  
          Get["/"] = x =&gt;
          {
              return "Hello";
          };
      }
  }
  </code></pre>
  
  <p>A OWIN middleware sets <code>User</code> property of <code>OwinRequest</code> object to a <code>ClaimsPrincipal</code> with authenticated identity. If I break inside the module and see Thread.CurrentPrincipal, it is set correctly to the <code>ClaimsPrincipal</code> I set earlier in the middleware. Yet, <code>RequriesAuthentication</code> sends back 401. BTW, context is null inside the module. What is it that I'm doing wrong?</p>
  
  <p>Some of the NuGet packages of interest that I use are</p>
  
  <pre><code>&lt;package id="Microsoft.Owin" version="1.1.0-beta2" targetFramework="net45" /&gt;
  &lt;package id="Microsoft.Owin.Host.HttpListener" version="1.1.0-beta2" targetFramework="net45" /&gt;
  &lt;package id="Microsoft.Owin.Hosting" version="1.1.0-beta2" targetFramework="net45" /&gt;
  &lt;package id="Nancy" version="0.17.1" targetFramework="net45" /&gt;
  &lt;package id="Nancy.Owin" version="0.17.1" targetFramework="net45" /&gt;
  &lt;package id="Owin" version="1.0" targetFramework="net45" /&gt;
  </code></pre>