I am using custom authorization for use login management. below is the code.. the constructor of the code is getting called every time (even after session timeout however the method OnAuthorization (AuthorizationFilterContext context) is not getting called after session timeout
public class CustomAuthorizeAttribute : TypeFilterAttribute
{
public CustomAuthorizeAttribute() : base(typeof(CustomAuthorizeFilter))
{
}
}
public class CustomAuthorizeFilter : IAuthorizationFilter
{
public CustomAuthorizeFilter()
{
}
public void OnAuthorization(AuthorizationFilterContext context)
{
//Logic to authenticate user based on context
}
}
I want OnAuthorization(AuthorizationFilterContext context) to be called even after session timeout, this is the only requirement , please advise.