You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/includes/references/tutorials/build-your-own-push-authenticator-app.md
+65-3Lines changed: 65 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,6 +335,24 @@ The data sent through the push notification contains the following information:
335
335
<td><code>username</code></td>
336
336
<td>Username of the user trying to authenticate.</td>
337
337
</tr>
338
+
339
+
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version > "7.2.0") %}
340
+
341
+
<tr>
342
+
<td><code>relativePath</code></td>
343
+
<td>
344
+
The resolved relative path to build the authentication API endpoint.<br/>
345
+
Possible relative paths:
346
+
<ol>
347
+
<li>/t/{tenant-domain}</li>
348
+
<li>/o/{organization-id}</li>
349
+
<li>/t/{tenant-domain}/o/{organization-id}</li>
350
+
</ol>
351
+
</td>
352
+
</tr>
353
+
354
+
{% endif %}
355
+
338
356
<tr>
339
357
<td><code>tenantDomain</code></td>
340
358
<td>Tenant domain of the root organization user (tenant user).</td>
@@ -389,10 +407,16 @@ The data sent through the push notification contains the following information:
389
407
</tr>
390
408
</table>
391
409
410
+
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version > "7.2.0") %}
411
+
412
+
{% else %}
413
+
392
414
!!! note
393
415
- For a root organization user (tenant user), only the **tenantDomain** will be available in the push notification data.
394
416
- For an organization user, only **organizationId** and **organizationName** will be available in the push notification data.
395
417
418
+
{% endif %}
419
+
396
420
With the above information, the push authenticator app should display the authentication request information to the user.
397
421
The user should be able to approve or deny the authentication request based on the information displayed.
398
422
@@ -445,6 +469,40 @@ The JWT token should contain the following claims in the payload:
445
469
</tr>
446
470
</table>
447
471
472
+
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version > "7.2.0") %}
473
+
474
+
Based on the notification data, the authentication API endpoint should be conditionally invoked with a **tenanted path**, an **organization path**, or a **tenant qualified organization aware path** by the push authenticator app. Either of the following methods can be used to build the authentication API endpoint.
475
+
476
+
### Option 1: Use relative path from notification data
477
+
478
+
The user information contains the resolved **relative path** to build the correct API endpoint. Invoke the authentication API with the **relative path** as shown below.
3. If the user information contains both the **tenant domain** and the **organization ID**, the authentication API should be invoked with the **tenant qualified organization aware path**.
According to the stored user information, the push authenticator app should conditionally invoke the relevant API authenticate endpoint with a **tenanted path** or an **organization path**.
449
507
450
508
If the user information contains the **tenant domain**, the authentication API should be invoked with the **tenanted path** as shown below.
@@ -455,11 +513,15 @@ If the user information contains the **organization ID**, the authentication API
The below given is a sample request payload to be sent to the authentication API.
459
519
460
-
{
461
-
"authResponse": <JWT token>
462
-
}
520
+
```json
521
+
{
522
+
"authResponse": "<JWT token>"
523
+
}
524
+
```
463
525
464
526
Once the authentication request is sent successfully, the push authenticator app will receive a **202 Accepted** response. With that, the authentication flow
465
527
will be continued and the user will be authenticated based on the response sent by the push authenticator app.
0 commit comments