客户自定义布局

Custom Layout for Client

我安装了启用了 ASP.NET 身份位的 Identity Server 4 服务器。

当用户被重定向到 Identity Server 的登录页面(现在是 ASP.NET Identity 登录页面)时,有没有办法确定哪个 Client用户来自哪里?

我的特定用例是为不同的客户端启用登录页面的一些自定义(不同的 MVC 布局)。

我们的示例 UI 展示了如何做到这一点 -

  • 注入IIdentityServerInteractionService到账户控制器
  • 调用 GetAuthorizationContext 方法获取信息,例如客户编号。

https://github.com/IdentityServer/IdentityServer4.Quickstart.UI/tree/release/Quickstart/Account/AccountController.cs