revoframework / Revo

Event Sourcing, CQRS and DDD framework for C#/.NET Core.
https://docs.revoframework.net/
MIT License
644 stars 70 forks source link

Where can i find an example of how used Security/Authorization ? #28

Open RustamGulamov opened 3 years ago

RustamGulamov commented 3 years ago

I don't quite understand how Authorization works. What are permission , contextId, resourceId. The documentation contains very short examples. Maybe you have some examples of how to use Authorization/Permission/Context/Resource ?

martinzima commented 3 years ago

Hello Rustam,

there is some information on authorization: in the documentation, but I admit its maybe not super clear on a few things. Simply put, a Permission instance defines that a user can do something (PermissionType), optionally also limited to a certain scope (ContextId, ResourceId). The interpretation of both ContextId and ResourceId is actually quite free and depends on your needs (you might not need it at all).

Best regards, MZ.

I think I might add a more complete example with authorization in the future.