【问题标题】:IdentityServer4 custom authentication with active directory带有活动目录的 IdentityServer4 自定义身份验证
【发布时间】:2016-12-06 01:29:19
【问题描述】:

我无法弄清楚如何在我的 IdentityServer4 实现中实现自定义身份验证,该实现将对 Active Directory 进行身份验证。注意:我需要对我公司的 Active Directory 服务器进行身份验证,它不是 azure Active Directory。

我不清楚我是否需​​要在我的 ASP.NET Core 服务器中创建一些新的中间件并使用 IApplicationBuilder 添加它,或者我是否需要向 IdentityServer 本身添加一些东西。

我发现另一个链接描述了如何与活动目录集成,但它创建了 IUserService 接口的实现,它似乎适用于早期版本的 IdentityServer,因为我相信 IdentityServer4 中不存在 IUserService。

感谢任何帮助。

【问题讨论】:

  • 你实现过这个吗?我很想看看你的解决方案。

标签: identityserver4


【解决方案1】:

在 IdentityServer4 中,您有责任实现登录代码并提供登录 UI。我们有一个示例 UI 项目(带有控制器)供您入门:

https://github.com/IdentityServer/IdentityServer4.Quickstart.UI

在那里您会找到AccountController - 这是您实现身份验证逻辑的地方。

只需将该代码与您自己的代码交换即可。如果是 Active Directory,请查看此处:

Validate a username and password against Active Directory?

【讨论】:

  • 您有关于如何使用 IdentityServer4 和公司 AD 实现单点登录的提示吗?
  • 您在 AccountController 中指定我们应该更新的地方的链接已损坏,您能否提供更新的链接?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-02-11
相关资源
最近更新 更多