是否可以使用FluentSecurity将AuthorizeAttribute应用于给定名称空间内的所有控制器?
Yes, you can do that using ForAllControllersInNamespaceContainingType<TType>()
or ForActionsMatching(info => *predicate*)
in FluentSecurity 2.0 (currently in beta).
You can read more about it in the documentation here: https://github.com/kristofferahl/FluentSecurity/wiki/Securing-controllers
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.