@@ -118,6 +118,21 @@ You need more claims to enable CAPTCHA in your custom policy:
118
118
<DisplayName >Flag indicating that the captcha was successfully solved</DisplayName >
119
119
<DataType >boolean</DataType >
120
120
</ClaimType >
121
+
122
+ <ClaimType Id =" mfaCaptchaEnabled" >
123
+ <DisplayName >flag used to control captcha enabled in MFA</DisplayName >
124
+ <DataType >string</DataType >
125
+ </ClaimType >
126
+
127
+ <ClaimType Id =" signupCaptchaEnabled" >
128
+ <DisplayName >flag used to control captcha enabled during signup</DisplayName >
129
+ <DataType >string</DataType >
130
+ </ClaimType >
131
+
132
+ <ClaimType Id =" signinCaptchaEnabled" >
133
+ <DisplayName >flag used to control captcha enabled during signin</DisplayName >
134
+ <DataType >string</DataType >
135
+ </ClaimType >
121
136
...
122
137
<!-- <ClaimsSchema>-->
123
138
```
@@ -314,6 +329,57 @@ To enable CAPTCHA in MFA flow, you need to make an update in two technical profi
314
329
...
315
330
</TechnicalProfile >
316
331
```
332
+
333
+ ### Enable CAPTCHA feature flag
334
+
335
+ 1 . In the * TrustFrameworkBase.XML* file, locate the ` ClaimsProviders ` element and add the claims provider by using the following code:
336
+
337
+ ``` xml
338
+ <!-- <ClaimsProvider>-->
339
+ ...
340
+ <ClaimsProvider >
341
+
342
+ <DisplayName >Set Feature Flags</DisplayName >
343
+
344
+ <TechnicalProfiles >
345
+
346
+ <TechnicalProfile Id =" SetFeatureDefaultValue" >
347
+ <DisplayName >Set Feature Flags</DisplayName >
348
+ <Protocol Name =" Proprietary" Handler =" Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
349
+ <OutputClaims >
350
+ <OutputClaim ClaimTypeReferenceId =" signupCaptchaEnabled" DefaultValue =" true" />
351
+ <OutputClaim ClaimTypeReferenceId =" signinCaptchaEnabled" DefaultValue =" true" />
352
+ <OutputClaim ClaimTypeReferenceId =" mfaCaptchaEnabled" DefaultValue =" true" />
353
+ </OutputClaims >
354
+ </TechnicalProfile >
355
+ </TechnicalProfiles >
356
+ </ClaimsProvider >
357
+ ...
358
+ <!-- <ClaimsProviders>-->
359
+ ```
360
+
361
+ 2 . Set ` DefaultValue ` to true or false depending on the CAPTCHA scenario
362
+
363
+ 3 . Add the feature flags technical profile to the user journey
364
+
365
+ ``` xml
366
+ <!-- <UserJourneys>-->
367
+ ...
368
+ <UserJourney Id =" SignUpOrSignIn" >
369
+ <OrchestrationSteps >
370
+
371
+ <!-- Add this orchestration step-->
372
+ <OrchestrationStep Order =" 1" Type =" ClaimsExchange" >
373
+ <ClaimsExchanges >
374
+ <ClaimsExchange Id =" SetFeatureDefaultValue" TechnicalProfileReferenceId =" SetFeatureDefaultValue" />
375
+ </ClaimsExchanges >
376
+ </OrchestrationStep >
377
+ ...
378
+ <!-- <UserJourneys>-->
379
+ ```
380
+
381
+ 4 . Reorder the rest of the orchestration steps in chronological order
382
+
317
383
## Upload the custom policy files
318
384
319
385
Use the steps in [ Upload the policies] ( tutorial-create-user-flows.md?pivots=b2c-custom-policy&branch=pr-en-us-260336#upload-the-policies ) to upload your custom policy files.
0 commit comments