-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hi @romainkuzniak ,
Thanks for sharing your interpretation about clean-architecture. I'm still learning about Clean Architecture so forgive me if I'm wrong but I think the dependency rule is violated in your UserCase using the Security annotation of Symfony. The use case becomes framework dependent.
Source code dependencies must point only inward, toward higher level policies
Rober C.Martin in his book Clean Architecture.
After a few research about "how about security in Clean architecture", I found this answer:
Security is an application specific concern, it belongs to the interactors. The controllers would access the current user's credentials and pass that information to the interactors. The interactors would use an authorization service to ensure that their particular interaction was authorized. The business objects wouldn't know anything about it.
https://groups.google.com/d/msg/clean-code-discussion/wHzmboOEHzo/3bO-r_dXpbAJ
What do you think ?