Reputation: 811
I'm writing my own AuthorizeCore attribute for handling access rights within my MVC application. Is there any way I can pass more than just the HTTPContext into the method? I would like to refrain from putting information into the users session just to get stuff in there.
Upvotes: 0
Views: 165
Reputation: 30152
No, thats the interface definition that requires the method signature to be in the format it is which limits to httpContext
AuthorizeAttribute.AuthorizeCore Method
protected virtual bool AuthorizeCore(
HttpContextBase httpContext
)
You could try to see if storing in HttpContext.Items works instead of the session.
Upvotes: 1