azure - Azure B2C 自定义流添加字段以登录
问题描述
我有一个 Azure B2C 自定义流程,我在其中定义了 TrustFrameworkExtension.xml 和 signupsignin.xml。我添加了下面列出的技术配置文件,期望在登录屏幕中添加一个新的自由格式文本字段,用户可以在其中添加他们的客户服务代表的姓名。不幸的是,这个字段没有添加到登录屏幕,但由于我将默认值设置为“Joe代表”,每个登录都有一个传入“Joe代表”的api调用。所以我已经完成了将值传递给我的 API 的部分,我只需要知道我需要做什么才能让自由格式的文本显示在 UI 上。建议?
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="setting.operatingMode">Email</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
<Item Key="ServiceUrl">https://somewickedcoolurl</Item>
<Item Key="SendClaimsIn">Body</Item>
<!-- Set AuthenticationType to Basic or ClientCertificate in production environments -->
<Item Key="AuthenticationType">None</Item>
<!-- REMOVE the following line in production environments -->
<Item Key="AllowInsecureAuthInProduction">true</Item>
</Metadata>
<IncludeInSso>false</IncludeInSso>
<InputClaims>
<InputClaim ClaimTypeReferenceId="signInName" />
<!-- Claims sent to your REST API -->
<InputClaim ClaimTypeReferenceId="email" />
<InputClaim ClaimTypeReferenceId="repName" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
<OutputClaim ClaimTypeReferenceId="password" Required="true" />
<OutputClaim ClaimTypeReferenceId="objectId" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" />
<!-- Optional claims, to be collected from the user -->
<OutputClaim ClaimTypeReferenceId="displayName" />
<OutputClaim ClaimTypeReferenceId="givenName" />
<OutputClaim ClaimTypeReferenceId="surName" />
<OutputClaim ClaimTypeReferenceId="repName" DefaultValue="Joe Representative" />
</OutputClaims>
<ValidationTechnicalProfiles>
<ValidationTechnicalProfile ReferenceId="login-NonInteractive" />
</ValidationTechnicalProfiles>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>
解决方案
您不能使用编排步骤,Type=CombinedSignInAndSignUp
也不能修改登录页面元素。无论将输出声明添加到控制登录功能的 selfAsserted 技术配置文件中,此步骤类型将始终默认为用户名/密码。
推荐阅读
- javascript - 如何将输入值绑定到 Vue.js 中方法的返回输出?
- javascript - DataTables:遍历所有行并从每行的特定单元格中获取值
- html - HTML img 拒绝低于特定宽度
- angular - 按下返回按钮后的延迟
- java - Rundeck [ssh-exec] 找不到 bash
- sql-server - 通过从 ComboBox 中选择任何表来填充 DataGridView
- android-kernel - 仿生/libc/include/sys/epoll.h:67:8:错误:重新定义“epoll_event”
- multithreading - Azure Continues Job 随机失败,Job failed due to exit code -532462766
- javascript - 强制输入字段的首字母大写,其余小写
- selenium - Selenium 和自定义 Web 扩展之间的通信