title: How to validate JWT Token in aspnet.core web api?
body: <p>I have created custom middleware class which validates the JWT token. I am calling this method before <code>app.AddMvc()</code> in configure method. ***</p>
  
  <p>I would like to know what are the things that I should add to Configuration services to authenticate my web API using JWT? I have added [Authorize] in my Controller class</p>
  
  <p>Do I need to call my middleware class which validates the JWT token first in Configure method? or I should call <code>App.UseAuthentication()</code>
  I am using the following order :</p>
  
  <pre><code> app.UseAuthentication();
   app.MessageHandlerMiddleware();
   app.UseMvc();
  </code></pre>
  
  <hr>
  
  <p>I am new to .net web API implementation. Could you please help me out?</p>