[英]Azure Custom Policy B2C - Orchestration step
I wanted to know how we can write a policy to show the user a Sign Up button which can direct him to another screen to sign up using the email address. 我想知道我们如何编写策略以向用户显示一个注册按钮,该按钮可以将他引导到另一个屏幕以使用电子邮件地址注册。 I wrote a custom policy which works with a user with account in the Active directory. 我编写了一个自定义策略,该策略适用于Active Directory中具有帐户的用户。 For this the first orchestration step lets the user sign in using an email. 为此,第一个编排步骤允许用户使用电子邮件登录。 The step comes back with a message if the user is not found. 如果找不到用户,该步骤将返回一条消息。
After that I am trying to write the second orchestration step which should be executed only if the user was not found in the previous orchestration step. 之后我尝试编写第二个编排步骤,只有在上一个编排步骤中找不到用户时才应执行该步骤。
<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>
The step is not executed even after I get the message that the user was not found. 即使在收到未找到用户的消息后,也不会执行该步骤。 How can I get this working. 我怎样才能使这个工作。 I would have preferred the user to be shown a sign up button the same screen. 我希望用户在同一个屏幕上显示一个注册按钮。
Any ideas? 有任何想法吗?
Update : I have a feeling that the alternate flow of not being able to find the user should be handled in the TechnicalProfile and not the orchestration step. 更新 :我感觉应该在TechnicalProfile而不是业务流程步骤中处理无法找到用户的备用流程。
Are you trying to show a sign-in screen which has a link "Sign-up" that allows user to sign-up using SerlfAssertedAttributeProvider? 您是否尝试显示一个登录屏幕,该屏幕上有一个“注册”链接,允许用户使用SerlfAssertedAttributeProvider注册? If so, this is how it is done in the LocalAccounts starter pack (copied from TrustFrameworkBase.xml
): 如果是这样,这就是在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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.