cDecker32
cDecker32

Reputation: 811

Pass values into AuthorizeCore

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

Answers (1)

Adam Tuliper
Adam Tuliper

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

Related Questions