Skip to content

Commit 2073cce

Browse files
authored
Update one-time-password-technical-profile.md
Error messages
1 parent 141c00a commit 2073cce

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

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

Lines changed: 38 additions & 37 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: 03/06/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,7 +128,16 @@ 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. The metadata should be configured in the [self-asserted](self-asserted-technical-profile.md) technical profile.
131+
The following settings can be used to code verification mode:
132+
133+
| Attribute | Required | Description |
134+
| --------- | -------- | ----------- |
135+
| Operation | Yes | The operation to be performed. Possible value: `VerifyCode`. |
136+
137+
138+
### Error messages
139+
140+
The following settings can be used to configure the error message displayed upon code verification failure. The metadata should be configured in the [self-asserted](self-asserted-technical-profile.md) technical profile. The error messsages can be [localized](localization-string-ids.md#one-time-password-error-messages).
132141

133142
| Attribute | Required | Description |
134143
| --------- | -------- | ----------- |
@@ -137,29 +146,21 @@ The following settings can be used to configure the error message displayed upon
137146
| UserMessageIfInvalidCode | No | The message to display to the user if they've provided an invalid code. |
138147
|UserMessageIfSessionConflict|No| The message to display to the user if the code cannot be verified.|
139148

140-
### Returning error message
141-
142-
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:
143-
144-
```XML
145-
<Item Key="en.UserMessageIfInvalidCode">Wrong code has been entered.</Item>
146-
```
147-
148149
### Example
149150

150151
The following example `TechnicalProfile` is used for verifying a code:
151152

152153
```XML
153154
<TechnicalProfile Id="VerifyCode">
154-
<DisplayName>Verify Code</DisplayName>
155-
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
156-
<Metadata>
157-
<Item Key="Operation">VerifyCode</Item>
158-
</Metadata>
159-
<InputClaims>
160-
<InputClaim ClaimTypeReferenceId="identifier" PartnerClaimType="identifier" />
161-
<InputClaim ClaimTypeReferenceId="otpGenerated" PartnerClaimType="otpToVerify" />
162-
</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>
163164
</TechnicalProfile>
164165
```
165166

0 commit comments

Comments
 (0)