簡體   English   中英

Azure自定義策略B2C - 業務流程步驟

[英]Azure Custom Policy B2C - Orchestration step

我想知道我們如何編寫策略以向用戶顯示一個注冊按鈕,該按鈕可以將他引導到另一個屏幕以使用電子郵件地址注冊。 我編寫了一個自定義策略,該策略適用於Active Directory中具有帳戶的用戶。 為此,第一個編排步驟允許用戶使用電子郵件登錄。 如果找不到用戶,該步驟將返回一條消息。

之后我嘗試編寫第二個編排步驟,只有在上一個編排步驟中找不到用戶時才應執行該步驟。

<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>

即使在收到未找到用戶的消息后,也不會執行該步驟。 我怎樣才能使這個工作。 我希望用戶在同一個屏幕上顯示一個注冊按鈕。

有任何想法嗎?

更新 :我感覺應該在TechnicalProfile而不是業務流程步驟中處理無法找到用戶的備用流程。

您是否嘗試顯示一個登錄屏幕,該屏幕上有一個“注冊”鏈接,允許用戶使用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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM