I'm developing a .Net Core Web API using JWT authentication (like here).
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.
To do that i made a Custom Policy-Based Authentication (like here), and i want to get the ip of each request on the AuthorizationHandler of the policy, but i can't get it (this didn't work on AuthorizationHandler).
Maybe that's not the way to do that I want, can anyone help me?
Thank you!