我正在使用JWT向B2C发送声明,按照WingTig Games演示代码。 我该如何在自我声明的注册TechnicalProfile
中隐藏用户不需要的声明 (下面是LocalAccountSignUpWithLogonNameWithIDs的示例)?
我尝试从ClaimType
定义中删除UserInputType
节点,但随后我在用户旅程播放器中获得以下错误:
策略“B2C_1A_signup_signin_extensions”中的技术配置文件“LocalAccountSignUpWithLogonNameWithIDs”中指定的输出声明类型“extension_my_claim”未指定UserInputType或DefaultValue,并且也不是从ValidationTechnicalProfile检索到的。
然后我将声明从该TechnicalProfile
的InputClaims
和OutputClaims
中删除,这样可以消除错误,但值不能够持久化。
<TechnicalProfile Id="LocalAccountSignUpWithLogonNameWithIDs">
<DisplayName>User ID signup with associate and org id</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="IpAddressClaimReferenceId">IpAddress</Item>
<Item Key="ContentDefinitionReferenceId">api.localaccountsignup</Item>
<Item Key="LocalAccountType">Username</Item>
<Item Key="LocalAccountProfile">true</Item>
<Item Key="language.button_continue">Create</Item>
</Metadata>
<CryptographicKeys>
<Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
</CryptographicKeys>
<InputClaims>
<InputClaim ClaimTypeReferenceId="signInName" />
<InputClaim ClaimTypeReferenceId="extension_my_claim" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="objectId" Required="true" />
<OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
<OutputClaim ClaimTypeReferenceId="newPassword" Required="true" />
<OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true" />
<OutputClaim ClaimTypeReferenceId="email" Required="true" />
<OutputClaim ClaimTypeReferenceId="extension_my_claim" Required="true"/>
<OutputClaim ClaimTypeReferenceId="executed-SelfAsserted-Input" DefaultValue="true" />
<OutputClaim ClaimTypeReferenceId="newUser" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" />
<OutputClaim ClaimTypeReferenceId="userPrincipalName" />
</OutputClaims>
<ValidationTechnicalProfiles>
<ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingLogonName" />
</ValidationTechnicalProfiles>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>