title: Authorization not working, It does not forbidden users to access my actions in asp.net core
body: <p>In start up  </p>
  
  <p>ConfigureServices function I add this</p>
  
  <pre><code>         services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
     .AddJwtBearer(jwtBearerOptions =&gt;
     {
         jwtBearerOptions.TokenValidationParameters = new TokenValidationParameters()
         {
             ValidateIssuerSigningKey = true,
  
             ValidateIssuer = false,
             ValidateAudience = false
         };
     });
  </code></pre>
  
  <p>then in Configure function I added this</p>
  
  <pre><code>  app.UseAuthentication();
  
              app.UseAuthorization();
  </code></pre>
  
  <p>and I added this line to my API </p>
  
  <pre><code>[Authorize]
  </code></pre>
  
  <p>but it give user to allow that function, what is my mistake? which part of auth I forget to add my code?</p>