PWA2APP Documentation

MFA

Technical reference generated from the platform contract: descriptions are in French.

POST /api/v1/auth/mfa/verify

`POST /auth/mfa/verify` (§19.3) — complète le défi 2FA posé par `POST /auth/login` (méthode

Corps de requête : JSON

  • 204 — 2FA vérifiée, session pleinement authentifiée
  • 400 — Code invalide
  • 401 — Non authentifié

POST /api/v1/auth/mfa/webauthn/options

`POST /auth/mfa/webauthn/options` (§19.3) — démarre la cérémonie WebAuthn de connexion

  • 200 — Défi WebAuthn de connexion
  • 401 — Non authentifié
  • 403 — Jeton CSRF manquant ou invalide
  • 409 — Aucune clé de sécurité enregistrée

POST /api/v1/auth/mfa/webauthn/verify

`POST /auth/mfa/webauthn/verify` (§19.3) — termine la cérémonie et marque la session

Corps de requête : JSON

  • 204 — 2FA vérifiée, session pleinement authentifiée
  • 400 — Cérémonie WebAuthn invalide ou expirée
  • 401 — Non authentifié
  • 403 — Jeton CSRF manquant ou invalide

POST /api/v1/auth/step-up

`POST /auth/step-up` (§19.3, §6.4) — ré-authentification récente pour les actions sensibles.

Corps de requête : JSON

  • 204 — Step-up réussi, fenêtre de fraîcheur de 5 minutes ouverte
  • 401 — Non authentifié, 2FA requise, ou mot de passe incorrect
  • 403 — Jeton CSRF manquant ou invalide

POST /api/v1/me/mfa/recovery-codes

`POST /me/mfa/recovery-codes` (§19.3) — régénère les 10 codes de récupération (invalide les

  • 200 — 10 nouveaux codes de récupération (les précédents sont invalidés)
  • 401 — Non authentifié ou 2FA requise
  • 403 — CSRF invalide ou step-up requis

POST /api/v1/me/mfa/totp

`POST /me/mfa/totp` (§19.3) — démarre (ou redémarre) l'activation TOTP.

  • 200 — Secret TOTP et URI de provisionnement
  • 401 — Non authentifié ou 2FA requise
  • 403 — Jeton CSRF manquant ou invalide

DELETE /api/v1/me/mfa/totp

`DELETE /me/mfa/totp` (§19.3) — nécessite un step-up récent (§6.4).

  • 204 — TOTP désactivée
  • 401 — Non authentifié ou 2FA requise
  • 403 — CSRF invalide ou step-up requis

POST /api/v1/me/mfa/totp/confirm

`POST /me/mfa/totp/confirm` (§19.3).

Corps de requête : JSON

  • 200 — TOTP activée, 10 codes de récupération générés
  • 400 — Code TOTP incorrect
  • 401 — Non authentifié ou 2FA requise
  • 403 — Jeton CSRF manquant ou invalide

GET /api/v1/me/mfa/webauthn

`GET /me/mfa/webauthn` (§19.3, implicite — écran paramètres 2FA).

  • 200 — Clés de sécurité / passkeys enregistrées
  • 401 — Non authentifié ou 2FA requise

POST /api/v1/me/mfa/webauthn/register/options

`POST /me/mfa/webauthn/register/options` (§19.3).

  • 200 — Défi WebAuthn de création de passkey
  • 401 — Non authentifié ou 2FA requise
  • 403 — Jeton CSRF manquant ou invalide

POST /api/v1/me/mfa/webauthn/register/verify

`POST /me/mfa/webauthn/register/verify` (§19.3).

Corps de requête : JSON

  • 201 — Passkey enregistrée
  • 400 — Cérémonie WebAuthn invalide ou expirée
  • 401 — Non authentifié ou 2FA requise
  • 403 — Jeton CSRF manquant ou invalide
  • 409 — Clé de sécurité déjà enregistrée

DELETE /api/v1/me/mfa/webauthn/{id}

`DELETE /me/mfa/webauthn/{id}` (§19.3) — nécessite un step-up récent (§6.4).

  • id (path, requis) — Identifiant de la clé de sécurité / passkey
  • 204 — Clé de sécurité supprimée
  • 401 — Non authentifié ou 2FA requise
  • 403 — CSRF invalide ou step-up requis
  • 422 — Identifiant invalide