I am doing custom authorization using a class derived from AuthorizeAttribute
and decorating my controllers with it. Per my understanding, only 1 instance of this attribute class is created to serve all requests. Is this correct? I am using locking inside, so want to be sure it causes no bottlenecks due to a single instance.
PS: I am using locking to retain values between OnAuthorization()
and AuthorizeCore()
calls as per this answer https://stackoverflow.com/a/12879182