触发电子邮件验证 [英] Triggering email verification

查看:64
本文介绍了触发电子邮件验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自定义策略.

I am using custom policies.

所需的用户旅程为:

  1. 用户在屏幕1上输入电子邮件/密码.
  2. 在成功验证屏幕1后,用户将被发送到屏幕2.在屏幕2中,用户必须输入发送到其电子邮件的密码. (请注意,用户已在注册过程中验证了电子邮件)

我坚持让2人上班. 当前的策略如下所示: 步骤1输出电子邮件声明.

I am stuck at getting 2 to work. The current policy looks like this: Step 1 outputs email claim.

第2步将电子邮件声明作为输入.

Step 2 takes the email claim as input.

在第2步中,将显示一个预填充了电子邮件的可编辑文本框.不需要任何代码.但是,如果电子邮件被编辑,则要求输入密码.

In step 2 an editable text box with email prefilled is presented. No code is asked for. However, if the email is edited a code is asked for.

<TechnicalProfile Id="VerifyEmailAddress">
  <DisplayName>Local Account Signin</DisplayName>
  <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <Metadata>
    <Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
  </Metadata>
  <IncludeInSso>false</IncludeInSso>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="signInName" />
  </InputClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="signInName" PartnerClaimType="Verified.Email" Required="true"/>
    <OutputClaim ClaimTypeReferenceId="objectId" />
    <OutputClaim ClaimTypeReferenceId="userPrincipalName" />
    <OutputClaim ClaimTypeReferenceId="authenticationSource" />
  </OutputClaims>
  <ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="AAD-UserReadUsingEmailAddress" />
  </ValidationTechnicalProfiles>
</TechnicalProfile>   

推荐答案

是的,给我带来了很多麻烦,

Yeah that caused me lots of trouble,

我基本上使用声明转换来实现

I basically use a claims transformation to do it

<InputClaimsTransformations>
   <InputClaimsTransformation ReferenceId="CopyClaimToreadOnly" />
</InputClaimsTransformations>
<InputClaims>
 <InputClaim ClaimTypeReferenceId="myAlreadyPopulatedClaim" />
 <InputClaim ClaimTypeReferenceId="myAlreadyPopulatedClaim-Readonly" />
</InputClaims>
<OutputClaims>
   <OutputClaim ClaimTypeReferenceId="myAlreadyPopulatedClaim-Readonly" 
PartnerClaimType="Verified.Email" />
 </OutputClaims>

该控件不够智能,无法意识到您填充了索赔并且仍要进行验证,它希望在同一页面上执行电子邮件输入和验证,因此,在拆分时,您必须进行索赔复制

The control isnt smart enough to realize that you populated the claim and you still want to do verification, it expects email entry and verification to be performed on the same page, when you split it you must do this claim copying

希望这对您有帮助

这篇关于触发电子邮件验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆