【发布时间】:2018-03-07 19:39:03
【问题描述】:
我想保护 dotnet core 中的某些 api。
不需要角色。我只需要允许或禁止。
要检查是否允许用户,我将 Active Directory 与 Novell nuget library 一起使用。这部分已经可以了。
为了保护 api,我只需在方法上添加 Authorize 属性。
目前我使用 http 标头来传递用户名和密码。 (base64 编码)。
如何将 AD 检查与 Authorize 属性结合使用?
我已经看过 AddIdentity / AddAuthentication / AddAuthorization / Claims / JWT / ... 但我迷路了。
【问题讨论】:
标签: c# authentication asp.net-web-api asp.net-core