title: Authenticating user for IdentityServer on the WebApi side
body: <p>I am new at this. Can someone please help me, since I am going crazy over my problem for nearly a month now :(
  In short: I have identity server project, an webapi project and angular client. Client request to authenticate and gets id_token and access_token (all good), access_token send to webapi project where I have:</p>
  
  <pre><code>var idServerBearerTokenAuthOptions = new IdentityServerBearerTokenAuthenticationOptions  {
              Authority = "https://localhost:11066/IdentityServer/identity",
              ValidationMode = ValidationMode.ValidationEndpoint,
              AuthenticationType = "Bearer",
              RequiredScopes = new[] { "permissions", "openid" },
              DelayLoadMetadata = true
          };
  app.UseIdentityServerBearerTokenAuthentication(idServerBearerTokenAuthOptions);
  </code></pre>
  
  <p>and I have Autofac which should get me the current logedin user</p>
  
  <pre><code>builder.RegisterApiControllers(Assembly.GetExecutingAssembly()).InstancePerRequest();
  builder.Register(c =&gt; new ClaimsIdentityApiUser((ClaimsIdentity)Thread.CurrentPrincipal.Identity)).As&lt;IApiUser&gt;().InstancePerRequest();
  </code></pre>
  
  <p>BUT Thread.CurrentPrincipal.Identity has nothing, and
  also ClaimsPrincipal.Current.Identity has nothing. What am I missing??</p>
  
  <p>p.s. Similar problem to this question <a href="https://stackoverflow.com/q/38712088">Protecting webapi with IdentityServer and Autofac - can&#39;t get claims</a> but obviously not same solution nor set up.</p>