I am looking to implement some business logic in my store as follows:
if (User.Identity.IsAuthenticated)
{
}
else
{
if (System.Web.HttpContext.Current.Session["SecurityCodeApproved"] == null || !(bool)System.Web.HttpContext.Current.Session["SecurityCodeApproved"])
{
Response.RedirectToRoute("Nop.Plugin.EVO.MyCustomLogin");
}
}
I need to execute some code for every controller request.
Is there a place where I can execute this session code for each request and if the session is null redirect them to MyCustomLogin page where they will be able to reenter the session code again.