I’ve a session vars that indicates me in which context I’m. On this contexts will depends some authorization.
Currently, I’ve a session vars, and I check it in a custom AuthorizeAttribute. It works great.
But I discovered the “ModelBinder” way, which basically adds a layer between between the access to the session and the use in controllers.
Is there a way to also use this ModelBinder in my AuthorizeAttribute?
Thank you!
No, the model binder is invoked after the authorize attribute OnAuthorization method assuming of course this method has authorized the request. But if you are interested in retrieving request parameters you could use the
filtyerContext: