Skip to content

Commit 834527e

Browse files
committed
update doc to add jwt request for iframe
1 parent 6dc756c commit 834527e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/extensions/ui-extensions.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,19 @@ To configure an `iframe` UI extension, mandatory fields are `name`, `position`,
207207

208208
**Receiving the JWT Token via ```postMessage```**
209209

210-
Upon loading the iframe, the PIM will send a postMessage with the JWT token. The message will be structured as follows:
210+
First, from your iframe, you must request for the JWT by doing a PostMessage with a payload containing ```type: 'request_jwt'```
211+
212+
Example :
213+
```js
214+
window.parent.postMessage(
215+
{
216+
type: 'request_jwt'
217+
},
218+
"*"
219+
);
220+
```
221+
222+
the PIM will then answer with a postMessage containing the JWT token. The message will be structured as follows:
211223

212224
```json
213225
{

0 commit comments

Comments
 (0)