feat: émettrice SSO draco_session — cookie partagé .dracodev.net, renouvellement et révocation (#216)
CI / lint (push) Successful in 3m32s
CI / security (push) Successful in 2m18s
CI / test (push) Successful in 5m38s
CI / build (push) Successful in 3m52s
CI / e2e (push) Successful in 19m0s

This commit is contained in:
Spark
2026-10-20 23:33:52 -04:00
parent e5577b9996
commit cb80b08f77
17 changed files with 677 additions and 13 deletions
+19
View File
@@ -121,6 +121,25 @@ const AuthManager = {
if (tokenData.user) {
sessionStorage.setItem(this.USER_KEY, JSON.stringify(tokenData.user));
}
this._honorReturnTo();
},
// Fusion ACC-3.1 (#216) : après connexion chez l'émettrice SSO,
// repartir vers l'application demanderesse. Le return_to est
// re-validé ici (https + domaine dracodev.net, jamais l'hôte
// courant) en plus de la validation serveur de /sso/authorize.
_honorReturnTo() {
try {
const rt = new URLSearchParams(window.location.search).get("return_to");
if (!rt) return;
const u = new URL(rt);
const okHost = u.hostname === "dracodev.net"
|| u.hostname.endsWith(".dracodev.net");
if (u.protocol === "https:" && okHost
&& u.hostname !== window.location.hostname) {
window.location.replace(rt);
}
} catch (e) { /* return_to illisible : on reste sur place */ }
},
getToken() {