4NK_wallet/docs/INTEGRATION.md
Nicolas Cantu 880fe3857e
Some checks failed
CI - 4NK_wallet / Unit Tests (push) Successful in 20s
CI - 4NK_wallet / Docker Build & Test (push) Successful in 5s
CI - 4NK_wallet / Security Audit (push) Successful in 4s
CI - 4NK_wallet / Release Guard (push) Has been skipped
CI - 4NK_wallet / Code Quality (push) Failing after 22s
CI - 4NK_wallet / Integration Tests (push) Failing after 9s
CI - 4NK_wallet / Security Tests (push) Failing after 4s
CI - 4NK_wallet / Documentation Tests (push) Failing after 3s
CI - 4NK_wallet / Performance Tests (push) Failing after 4s
CI - 4NK_wallet / Notify (push) Failing after 2s
chore(release): latest 0.1.0 + sécurité/CI/docs
2025-08-27 13:50:32 +02:00

21 lines
911 B
Markdown
Raw Permalink 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 navigateur (parent) ↔ ihm_client (iframe)
## Principes
- `ihm_client` communique via `window.postMessage` (cf. `ihm_client/docs/INTEGRATION_IFRAME.md`)
- Dans 4NK_wallet, `ihm_client` est chargé dans un `iframe` (navigateur)
- Le parent envoie des objets typés à liframe avec `iframe.contentWindow.postMessage(obj, origin)`
- Le parent écoute `window.addEventListener('message', handler)` pour les réponses
## Messages pris en charge (extraits)
- REQUEST_LINK → LINK_ACCEPTED|ERROR
- VALIDATE_TOKEN → VALIDATE_TOKEN
- RENEW_TOKEN → RENEW_TOKEN
## Mapping côté parent
- Sortant: parent → `iframe.contentWindow.postMessage({ type, ... }, origin)`
- Entrant: `event.data` (objet typé) traité par le parent et journalisé
## Sécurité
- `ihm_client` valide lorigine et les tokens
- Le parent ninjecte pas de scripts dans liframe; seule la messagerie est utilisée