In ASP.NET MVC 5 we can use [Authorize] attribute to check authorization and limit access to some actions\\pages. I wonder how can I modify this attribu
Something like this? Create your own attribute and override the default with your own code.
public class CustomAuthAttribute : AuthorizeAttribute
{
public override void OnAuthorization(AuthorizationContext filterContext)
{
base.OnAuthorization(filterContext);
//your code here
}
}
Then decorate your controllers/actions with [CustomAuthAttribute]