Skip to content

Commit 19df117

Browse files
authored
Merge pull request #106701 from yoelhor/patch-8
Update one-time-password-technical-profile.md
2 parents bbbb06e + d3228ee commit 19df117

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

articles/active-directory-b2c/one-time-password-technical-profile.md

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: celestedg
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: reference
12-
ms.date: 02/10/2020
12+
ms.date: 03/09/2020
1313
ms.author: mimart
1414
ms.subservice: B2C
1515
---
@@ -65,15 +65,15 @@ The **OutputClaimsTransformations** element may contain a collection of **Output
6565

6666
### Metadata
6767

68-
The following settings can be used to configure code generation and maintenance:
68+
The following settings can be used to configure code generation mode:
6969

7070
| Attribute | Required | Description |
7171
| --------- | -------- | ----------- |
7272
| CodeExpirationInSeconds | No | Time in seconds until code expiration. Minimum: `60`; Maximum: `1200`; Default: `600`. |
7373
| CodeLength | No | Length of the code. The default value is `6`. |
7474
| CharacterSet | No | The character set for the code, formatted for use in a regular expression. For example, `a-z0-9A-Z`. The default value is `0-9`. The character set must include a minimum of 10 different characters in the set specified. |
7575
| NumRetryAttempts | No | The number of verification attempts before the code is considered invalid. The default value is `5`. |
76-
| Operation | Yes | The operation to be performed. Possible values: `GenerateCode`, or `VerifyCode`. |
76+
| Operation | Yes | The operation to be performed. Possible value: `GenerateCode`. |
7777
| ReuseSameCode | No | Whether a duplicate code should be given rather than generating a new code when given code has not expired and is still valid. The default value is `false`. |
7878

7979
### Returning error message
@@ -86,22 +86,22 @@ The following example `TechnicalProfile` is used for generating a code:
8686

8787
```XML
8888
<TechnicalProfile Id="GenerateCode">
89-
<DisplayName>Generate Code</DisplayName>
90-
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
91-
<Metadata>
92-
<Item Key="Operation">GenerateCode</Item>
93-
<Item Key="CodeExpirationInSeconds">600</Item>
94-
<Item Key="CodeLength">6</Item>
95-
<Item Key="CharacterSet">0-9</Item>
96-
<Item Key="NumRetryAttempts">5</Item>
97-
<Item Key="ReuseSameCode">false</Item>
98-
</Metadata>
99-
<InputClaims>
100-
<InputClaim ClaimTypeReferenceId="identifier" PartnerClaimType="identifier" />
101-
</InputClaims>
102-
<OutputClaims>
103-
<OutputClaim ClaimTypeReferenceId="otpGenerated" PartnerClaimType="otpGenerated" />
104-
</OutputClaims>
89+
<DisplayName>Generate Code</DisplayName>
90+
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
91+
<Metadata>
92+
<Item Key="Operation">GenerateCode</Item>
93+
<Item Key="CodeExpirationInSeconds">600</Item>
94+
<Item Key="CodeLength">6</Item>
95+
<Item Key="CharacterSet">0-9</Item>
96+
<Item Key="NumRetryAttempts">5</Item>
97+
<Item Key="ReuseSameCode">false</Item>
98+
</Metadata>
99+
<InputClaims>
100+
<InputClaim ClaimTypeReferenceId="identifier" PartnerClaimType="identifier" />
101+
</InputClaims>
102+
<OutputClaims>
103+
<OutputClaim ClaimTypeReferenceId="otpGenerated" PartnerClaimType="otpGenerated" />
104+
</OutputClaims>
105105
</TechnicalProfile>
106106
```
107107

@@ -128,46 +128,45 @@ The **OutputClaimsTransformations** element may contain a collection of **Output
128128

129129
### Metadata
130130

131-
The following settings can be used to configure the error message displayed upon code verification failure:
131+
The following settings can be used to code verification mode:
132132

133133
| Attribute | Required | Description |
134134
| --------- | -------- | ----------- |
135-
| UserMessageIfSessionDoesNotExist | No | The message to display to the user if the code verification session has expired. It is either the code has expired or the code has never been generated for a given identifier. |
136-
| UserMessageIfMaxRetryAttempted | No | The message to display to the user if they've exceeded the maximum allowed verification attempts. |
137-
| UserMessageIfInvalidCode | No | The message to display to the user if they've provided an invalid code. |
135+
| Operation | Yes | The operation to be performed. Possible value: `VerifyCode`. |
138136

139-
### Returning error message
140137

141-
As described in [Metadata](#metadata), you can customize error message shown to the user for different error cases. You can further localize those messages by prefixing the locale, for example:
138+
### Error messages
142139

143-
```XML
144-
<Item Key="en.UserMessageIfInvalidCode">Wrong code has been entered.</Item>
145-
```
140+
The following settings can be used to configure the error messages displayed upon code verification failure. The metadata should be configured in the [self-asserted](self-asserted-technical-profile.md) technical profile. The error messages can be [localized](localization-string-ids.md#one-time-password-error-messages).
141+
142+
| Attribute | Required | Description |
143+
| --------- | -------- | ----------- |
144+
| UserMessageIfSessionDoesNotExist | No | The message to display to the user if the code verification session has expired. It is either the code has expired or the code has never been generated for a given identifier. |
145+
| UserMessageIfMaxRetryAttempted | No | The message to display to the user if they've exceeded the maximum allowed verification attempts. |
146+
| UserMessageIfInvalidCode | No | The message to display to the user if they've provided an invalid code. |
147+
|UserMessageIfSessionConflict|No| The message to display to the user if the code cannot be verified.|
146148

147149
### Example
148150

149151
The following example `TechnicalProfile` is used for verifying a code:
150152

151153
```XML
152154
<TechnicalProfile Id="VerifyCode">
153-
<DisplayName>Verify Code</DisplayName>
154-
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
155-
<Metadata>
156-
<Item Key="Operation">VerifyCode</Item>
157-
<Item Key="UserMessageIfInvalidCode">Wrong code has been entered.</Item>
158-
<Item Key="UserMessageIfSessionDoesNotExist">Code has expired.</Item>
159-
<Item Key="UserMessageIfMaxRetryAttempted">You've tried too many times.</Item>
160-
</Metadata>
161-
<InputClaims>
162-
<InputClaim ClaimTypeReferenceId="identifier" PartnerClaimType="identifier" />
163-
<InputClaim ClaimTypeReferenceId="otpGenerated" PartnerClaimType="otpToVerify" />
164-
</InputClaims>
155+
<DisplayName>Verify Code</DisplayName>
156+
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
157+
<Metadata>
158+
<Item Key="Operation">VerifyCode</Item>
159+
</Metadata>
160+
<InputClaims>
161+
<InputClaim ClaimTypeReferenceId="identifier" PartnerClaimType="identifier" />
162+
<InputClaim ClaimTypeReferenceId="otpGenerated" PartnerClaimType="otpToVerify" />
163+
</InputClaims>
165164
</TechnicalProfile>
166165
```
167166

168167
## Next steps
169168

170-
See the following article for example of using one-time password technial profile with custom email verification:
169+
See the following article for example of using one-time password technical profile with custom email verification:
171170

172171
- [Custom email verification in Azure Active Directory B2C](custom-email.md)
173172

0 commit comments

Comments
 (0)