带有Azure AD的Identity Server和自定义登录页面

时间:2017-09-26 19:47:45

标签: identityserver4

我想设置一个连接到azure广告的身份服务器,但我想在身份服务器中使用自定义登录页面,这可能吗?

我知道Azure AD允许自定义品牌,但它不允许我们需要的自定义类型。

1 个答案:

答案 0 :(得分:2)

虽然Azure AD不直接支持UI自定义,但Azure AD B2C可以。请参阅此Microsoft Doc作为自定义Azure AD B2C的UI的指南: https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-customize-ui-custom#upload-the-ui-customization-pack-sample-files

如Microsoft Doc中所述,最简单的模板如下:

<!DOCTYPE html>
<html>
  <head>
    <title>Your page content’s tile!</title>
  </head>
  <body>
    <h1>My custom header!</h1>
    <div id="api"></div>
  </body>
</html>

唯一的要求是&#39;锚元素&#39;最高级<div id="api"></api>中包含的<body>。其他一切都是可定制的。如果需要动态页面,您甚至可以使用cshtml文件和剃刀模板或其他一些动态模板引擎。

此外,Azure AD B2C仍然是OAuth2提供商,因此使用此方法仍然可以将IdentityServer4联合到它。