add claims to windows identity
<p>I am trying to assign roles as claims for <code>Windows Authentication</code> for <code>Asp.net Core Webapi</code> project. Below is my transform by adding a role claim current identity.</p>

<pre><code>public class ClaimsTransformer : IClaimsTransformer
    {
        public Task&lt;ClaimsPrincipal&gt; TransformAsync(ClaimsTransformationContext context)
        {
            //add new claim
            var ci = (ClaimsIdentity) context.Principal.Identity;
            var c = new Claim(ClaimTypes.Role, "admin");
            ci.AddClaim(c);

            return Task.FromResult(context.Principal);
        }
    }
</code></pre>

<p>And this middleware is added to Startup.Configure:</p>

<pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
      {
          loggerFactory.AddConsole(LogLevel.Debug);
          loggerFactory.AddDebug();

          app.UseClaimsTransformation(o =&gt; new ClaimsTransformer().TransformAsync(o));

          app.UseStaticFiles();

          app.UseMvc();
      }
</code></pre>

<p>However role <code>admin</code> is not authorized in this method (403-Forbidden).</p>

<pre><code>[Route("api/[controller]")]
    public class ValuesController : Controller
    {        
        // GET api/values/5
        [HttpGet("{id}")]
        [Authorize(Roles = "admin")]
        public string Get(int id)
        {
            return "value";
        }
    }
</code></pre>

<p>It is working properly if <code>[Authorize]</code> is used. Any missing?</p>