如何将 UI 上的自我断言 Azure AD B2C 字段组合在一起,并使用身份体验框架自定义策略直观地为每个组命名?
How to group together self asserting Azure AD B2C fields on UI and give each group a name visually using Identity Experience Framework Custom policy?
我正在寻找一种方法,将自我断言的 Azure AD B2C 字段组合在一起,并使用身份体验框架自定义策略在 UI 中直观地为每个组命名。结果应类似于以下示例:
用户信息:
- 名字
- 姓氏
主题信息:
- 序列号
- 主题名称
也许我应该将字段放在两个单独的技术配置文件中,然后以某种方式将它们合并到编排中?
由于需要本地化,无法在 CSS 中执行此操作。
我在 https://docs.microsoft.com and https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/tree/master/Documentation
没有找到与此相关的内容
并且没有找到任何字段在 UI 中分组的示例。
目前,您无法对表单域进行分组;但是,您可以拆分注册表,以便在一页中收集用户信息,在另一页中收集主题信息。
体验这种拆分(或分页)注册的工作示例
找到针对此的自定义策略
使用 IEF,您可以定义额外的声明类型
<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="group1">
<DataType>string</DataType>
<UserInputType>Paragraph</UserInputType>
</ClaimType>
<ClaimType Id="group2">
<DataType>string</DataType>
<UserInputType>Paragraph</UserInputType>
</ClaimType>
</ClaimsSchema>
</BuildingBlocks>
并在其间使用它来划分不同的输入控件组。
<ClaimsProviders>
<ClaimsProvider>
<DisplayName>Self Asserted</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="SelfAsserted-Input">
<InputClaims>
<InputClaim ClaimTypeReferenceId="group1" DefaultValue="Group 1"/>
<InputClaim ClaimTypeReferenceId="displayName" />
<InputClaim ClaimTypeReferenceId="email" />
<InputClaim ClaimTypeReferenceId="group2" DefaultValue="Group 2"/>
<InputClaim ClaimTypeReferenceId="givenName" />
<InputClaim ClaimTypeReferenceId="surname" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="group1"/>
<OutputClaim ClaimTypeReferenceId="displayName"/>
<OutputClaim ClaimTypeReferenceId="email" Required="true" PartnerClaimType="Verified.Email" />
<OutputClaim ClaimTypeReferenceId="group2" />
<OutputClaim ClaimTypeReferenceId="givenName" />
<OutputClaim ClaimTypeReferenceId="surname" />
</OutputClaims>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
</ClaimsProviders>
对于上述 ClaimType,它将在页面上呈现为:
<p id="group1">Group 1</p>
<p id="group2">Group 2</p>
一旦您发现预期的声明已呈现,您就可以定义自己的 css 重新定位它,使其看起来像您提议的那样。您还可以通过在策略和 Azure 门户中进行语言自定义来将其本地化。
我正在寻找一种方法,将自我断言的 Azure AD B2C 字段组合在一起,并使用身份体验框架自定义策略在 UI 中直观地为每个组命名。结果应类似于以下示例:
用户信息:
- 名字
- 姓氏
主题信息:
- 序列号
- 主题名称
也许我应该将字段放在两个单独的技术配置文件中,然后以某种方式将它们合并到编排中?
由于需要本地化,无法在 CSS 中执行此操作。
我在 https://docs.microsoft.com and https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/tree/master/Documentation
没有找到与此相关的内容并且没有找到任何字段在 UI 中分组的示例。
目前,您无法对表单域进行分组;但是,您可以拆分注册表,以便在一页中收集用户信息,在另一页中收集主题信息。
体验这种拆分(或分页)注册的工作示例 找到针对此的自定义策略使用 IEF,您可以定义额外的声明类型
<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="group1">
<DataType>string</DataType>
<UserInputType>Paragraph</UserInputType>
</ClaimType>
<ClaimType Id="group2">
<DataType>string</DataType>
<UserInputType>Paragraph</UserInputType>
</ClaimType>
</ClaimsSchema>
</BuildingBlocks>
并在其间使用它来划分不同的输入控件组。
<ClaimsProviders>
<ClaimsProvider>
<DisplayName>Self Asserted</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="SelfAsserted-Input">
<InputClaims>
<InputClaim ClaimTypeReferenceId="group1" DefaultValue="Group 1"/>
<InputClaim ClaimTypeReferenceId="displayName" />
<InputClaim ClaimTypeReferenceId="email" />
<InputClaim ClaimTypeReferenceId="group2" DefaultValue="Group 2"/>
<InputClaim ClaimTypeReferenceId="givenName" />
<InputClaim ClaimTypeReferenceId="surname" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="group1"/>
<OutputClaim ClaimTypeReferenceId="displayName"/>
<OutputClaim ClaimTypeReferenceId="email" Required="true" PartnerClaimType="Verified.Email" />
<OutputClaim ClaimTypeReferenceId="group2" />
<OutputClaim ClaimTypeReferenceId="givenName" />
<OutputClaim ClaimTypeReferenceId="surname" />
</OutputClaims>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
</ClaimsProviders>
对于上述 ClaimType,它将在页面上呈现为:
<p id="group1">Group 1</p>
<p id="group2">Group 2</p>
一旦您发现预期的声明已呈现,您就可以定义自己的 css 重新定位它,使其看起来像您提议的那样。您还可以通过在策略和 Azure 门户中进行语言自定义来将其本地化。