I've a UI with Jquery which makes a call to MVC using Ajax request.
I would like to validate each request against the userProfile (custom class which holds account number, ID etc).
Could anyone please suggest whether it is possible to create custom Authorize Attribute to validate that both request and userprofile are same?
I would then like to do something like below:
[AuthorizeUser]
public ActionResult GetMyConsumption(string accountNumber)
{
.....
return View();
}