casbin-net / casbin-aspnetcore

Casbin.NET integration middleware and sample code for ASP.NET Core
https://github.com/casbin/Casbin.NET
Apache License 2.0
69 stars 21 forks source link

Providing basic Casbin.NET integration and permission authorize DI extension Seperately. #2

Closed arthuridea closed 4 years ago

arthuridea commented 4 years ago

A more lightweight DI extension method without authorization should be seperately provided. Casbin.NET may act as a pure service for resource permission storage. In this scenario, people focus on the permissions they have ,not challenging the authorization. We can provide extension method such as AddCasbinCore and AddCasbinAuthorization to meet these aspects of needs. AddCasbinCore serves basic Casbin.Net as a library,providing an ability to use basic Enforcer and Management API,while AddCasbinAuthorization focus on Permission authorize middleware registration.

sagilio commented 4 years ago

I think we can provide an AddCasbin extension method. I will work on this when #1 merged.