I need advice coming up with the proper configuration for a scenario using IdentiyServer.
The scenario is machine to machine communication. A single web api is divided into two parts. One part allows notifications to be posted into it (write). The second allows information to be queried from it (read).
I envision protecting endpoints with something like [Authorize("Write")]
and [Authorize("Read")]
. From what I can tell, scopes are API wide... if they can be used to clarify access in this way, I haven't figured it out... or its too simple for my brain.
Suggestions?
答案 0 :(得分:2)
范围可以在比应用程序范围更精细的级别使用。只需在API中针对该API所需的范围进行正常声明检查。