我尝试传递email
声明,就像我将其他声明传递给注册政策一样,但它不起作用。我不得不将它添加为<InputClaim>
我的技术资料,但我不明白为什么。
在下面的示例中,我传入email
and extension_MyCustomClaim
。我不显示extension_MyCustomClaim
,但该值被保留。
我的叶子政策
<TrustFrameworkPolicy ...>
...
<RelyingParty>
<DefaultUserJourney ReferenceId="MyUserJourney" />
<TechnicalProfile Id="PolicyProfile">
<DisplayName>PolicyProfile</DisplayName>
<Protocol Name="OpenIdConnect" />
<InputTokenFormat>JWT</InputTokenFormat>
<CryptographicKeys>
<Key Id="client_secret" StorageReferenceId="B2C_1A_MyClientSecret" />
</CryptographicKeys>
<InputClaims>
<InputClaim ClaimTypeReferenceId="extension_MyCustomClaim" />
<InputClaim ClaimTypeReferenceId="email" />
</InputClaims>
...
</TechnicalProfile>
</RelyingParty>
</TrustFrameworkPolicy>
我的用户旅程
<UserJourney Id="MyUserJourney">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="ClaimsExchange" ContentDefinitionReferenceId="api.signup-ext">
<ClaimsExchanges>
<ClaimsExchange Id="LocalAccountSignUp" TechnicalProfileReferenceId="LocalAccountSignUp" />
</ClaimsExchanges>
</OrchestrationStep>
...
</OrchestrationSteps>
</UserJourney>
我的技术资料
<TechnicalProfile Id="LocalAccountSignUp">
<DisplayName>User ID signup with input claims</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
...
</Metadata>
<CryptographicKeys>
...
</CryptographicKeys>
<InputClaims>
<!-- why do I have to specify this here? -->
<!-- The other claim like extension_MyCustomClaim are -->
<!-- not specified here but are being persisted -->
<InputClaim ClaimTypeReferenceId="email" />
</InputClaims>
<OutputClaims>
<!-- uncommenting this claim will put it on the screen. used for debugging -->
<!-- <OutputClaim ClaimTypeReferenceId="extension_MyCustomClaim" /> -->
</OutputClaims>
...
</TechnicalProfile>
如果我添加extension_MyCustomClaim
为一个<OutputClaim>
,它将显示在屏幕上,并带有填充的值。我不必将其添加为<InputClaim>
.
我不理解这里的不一致。
更新
我错了...
如果我添加
extension_MyCustomClaim
为一个<OutputClaim>
,它将显示在屏幕上,并带有填充的值。我不必将其添加为<InputClaim>
.
不是真的。声明将显示在屏幕上,但不会填充该值。