title: Validate IP from request against claim in JWT authentication token
body: <p>I'm developing a .Net Core Web API using JWT authentication (like <a href="https://goblincoding.com/2016/07/24/asp-net-core-policy-based-authorisation-using-json-web-tokens/" rel="nofollow noreferrer">here</a>).</p>
  
  <p>I added a new Claim to store the ip adrress of the request, and then, I want to check it on each consecutive request to validate that the ip address source of the request is the same ip that originally requested the token.</p>
  
  <p>To do that i made a Custom Policy-Based Authentication (like <a href="https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies" rel="nofollow noreferrer">here</a>), and i want to get the ip of each request on the AuthorizationHandler of the policy, but i can't get it (<a href="https://stackoverflow.com/questions/28664686/how-do-i-get-client-ip-address-in-asp-net-core">this</a> didn't work on AuthorizationHandler).</p>
  
  <p>Maybe that's not the way to do that I want, can anyone help me?</p>
  
  <p>Thank you!</p>