我想知道,我们如何写一个政策,以显示给用户一个注册按钮,可以引导他到另一个屏幕上注册使用电子邮件地址。我编写了一个自定义策略,它与Active目录中有帐户的用户一起工作。为此,第一个编排步骤允许用户使用电子邮件登录。如果找不到用户,该步骤将返回一条消息。
在此之后,我尝试编写第二个编排步骤,只有在前一个编排步骤中找不到用户时才应该执行该步骤。
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="true">
<Value>objectId</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
</ClaimsExchanges>
</OrchestrationStep>即使在我收到没有找到用户的消息之后,也不会执行该步骤。我怎么才能让这件事发生。我更希望用户在相同的屏幕上看到一个注册按钮。
有什么想法吗?
Update:我觉得不能找到用户的替代流应该在TechnicalProfile中处理,而不是在编排步骤中处理。
发布于 2019-04-01 04:34:27
您是否试图显示一个登录屏幕,其中有一个链接“登录”,允许用户使用SerlfAssertedAttributeProvider注册?如果是这样的话,在LocalAccounts初学者包(从TrustFrameworkBase.xml复制)中就是这样做的:
<OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
<ClaimsProviderSelections>
<ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
</ClaimsProviderSelections>
<ClaimsExchanges>
<ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="true">
<Value>objectId</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
</ClaimsExchanges>
</OrchestrationStep>https://stackoverflow.com/questions/55401624
复制相似问题