首页 > 解决方案 > 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>

标签: azureazure-ad-b2c

解决方案


您不能使用编排步骤,Type=CombinedSignInAndSignUp也不能修改登录页面元素。无论将输出声明添加到控制登录功能的 selfAsserted 技术配置文件中,此步骤类型将始终默认为用户名/密码。


推荐阅读