DavidParks8 / Owin-Authorization

Backport of Asp.Net core's policy based authorization to Asp.Net 4
Other
60 stars 16 forks source link

FIX: AdditionalHandler not registered in DefaultAuthorizationService #34

Closed 8snit closed 8 years ago

8snit commented 8 years ago

splitting up IAuthorizationRequirement and AuthorizationHandler, it is necessary to register itas AdditionalHandler -> this AdditionalHandler is not considered in DefaultAuthorizationService

updated WebApi OWIN sample to demonstrate

BTW: the main reason for this split is to allow dependency injection in the AuthorizationHandler, so I'm not sure if this AdditionalHandler mechanism in the backport is the best strategy...

DavidParks8 commented 8 years ago

This is primarily my fault for not writing a "contributing.md" file yet, but in the future I will only accept pull requests to the dev branch.

Good catch with the DefaultAuthorizationService bug.

Looking at the code now, I agree that AdditionalHandlers could be removed with the feature still existing through dependency injection. I'll make a note to do exactly that.