title: ASP .NET CORE 2.2 JWT & Claims identity Authentication for Website
body: <p>I have an .net core 2.2 api which generates (on a successful login) a JWT token which contains a claims identity that passes along information such as the username, permissions and roles of the authenticated user.</p>
  
  <p>In my .net core 2.2. web app I have a login mechanism which retrieves the JWT token via the user of a controller.</p>
  
  <p>My question is.</p>
  
  <p>How can I expand the token from within my login controller and set up my web app to include the use of the authentication mechanisms like <code>User.Identity.IsAuthenticated</code>, <code>User.IsInRole("Admin")</code> and controller actions like <code>[Authorize]</code> and <code>[Authorize(Roles="Admin")]</code></p>
  
  <p>I've been directed towards looking at the source code behind external authentication providers such as facebook/google but to no avail.</p>
  
  <p>Thanks in advance.</p>