title: How to use JWT in .NET MVC (not .NET Core)
body: <p>I have an ASP.NET MVC 5 project and I authenticate users via an external service that using OAuth2.0. After user is authenticated, the service returns users' id, name and surname without any problem.</p>
  
  <p>At this stage, I also need to authorize users after they login by using JWT and I use id of them to pass JWT. In addition to that I also need to prevent unathenticated users from accessing Index page by using [Authorize], etc. decorator on the action methods as in MVC and set their session expiration e.g. 2 minutes. I look at many pages and articles on the web but almost all examples or samples are for .NET Core and not suitable for .NET MVC :( There are just some examples i.e. <a href="https://stackoverflow.com/questions/29791499/how-to-use-jwt-in-mvc-application-for-authentication-and-authorization">How to use JWT in MVC application for authentication and authorization?</a> but not detailed and missing explanations on Startup and Controller classes. As I have no experience about JWT, I need a good example covering Startup, Controller methods e.g. Login, Authenticate, etc. Is there any or could you post by completing the missing part of the example on <a href="https://stackoverflow.com/questions/29791499/how-to-use-jwt-in-mvc-application-for-authentication-and-authorization">How to use JWT in MVC application for authentication and authorization?</a>? Any help would be appreciated. </p>