4NK_wallet/docs/INTEGRATION.md
Your Name e54821597c
Some checks failed
CI - 4NK_wallet / Code Quality (push) Failing after 33s
CI - 4NK_wallet / Unit Tests (push) Failing after 32s
CI - 4NK_wallet / Integration Tests (push) Failing after 9s
CI - 4NK_wallet / Security Tests (push) Failing after 27s
CI - 4NK_wallet / Docker Build & Test (push) Failing after 8s
CI - 4NK_wallet / Documentation Tests (push) Failing after 3s
CI - 4NK_wallet / Release Guard (push) Has been skipped
CI - 4NK_wallet / Performance Tests (push) Failing after 27s
CI - 4NK_wallet / Notify (push) Failing after 1s
chore(refine): adapter .gitea/docs/scripts au projet 4NK_wallet
2025-08-27 11:56:21 +02:00

23 lines
806 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Intégration WebView ↔ ihm_client
## Principes
- `ihm_client` parle via `window.postMessage` (cf. `ihm_client/docs/INTEGRATION_IFRAME.md`)
- En mobile, on charge `ihm_client` dans une WebView
- On redirige `window.postMessage` vers `ReactNativeWebView.postMessage`
- Canal entrant: RN appelle `window.__RN_RECEIVE__(jsonString)` pour simuler un `MessageEvent`
## Messages pris en charge (extraits)
- REQUEST_LINK → LINK_ACCEPTED|ERROR
- VALIDATE_TOKEN → VALIDATE_TOKEN
- RENEW_TOKEN → RENEW_TOKEN
## Mapping côté RN
- Sortant: RN → `__RN_RECEIVE__(jsonString)` (déclenche un `message` côté page)
- Entrant: page → `postMessage(any)` redirigé vers RN `onMessage`
## Sécurité
- `ihm_client` valide lorigine et les tokens
- RN ne manipule pas directement les tokens côté page