This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
resource-based AuthorizationHandler is invoked for other resource types. #494
Closed
Description
I have two authZ handlers that derive from AuthorizationHandler<TRequirement, TResource>
with different resource types:
services.AddInstance<IAuthorizationHandler>(new FooAuthorizationHandler());
services.AddInstance<IAuthorizationHandler>(new BarAuthorizationHandler());
The AuthorizationService runs both handlers, passing in null when the resource type does not match. Is this the intended behavior? If so, I need to check for null resource and exit.