Files
progcode/web/public/assets/editorial/2023/sessions-auth-2023-lifecycle.svg
huncode 6e664b3ca6
Build and deploy / deploy (push) Successful in 17s
revise February 2023 session articles
2026-07-31 14:34:09 +03:00

51 lines
3.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 760" role="img" aria-labelledby="sessions-auth-2023-lifecycle-title sessions-auth-2023-lifecycle-desc">
<title id="sessions-auth-2023-lifecycle-title">Жизненный цикл одной учебной сессии</title>
<desc id="sessions-auth-2023-lifecycle-desc">Вход создаёт active session fixture-s-1. Rotation выводит её в rotated и создаёт fixture-s-2 active. Stale операции старого ID отклоняются. Logout текущего ID revoke-ит запись и возвращает clear cookie.</desc>
<style>
.bg { fill: #f7fafc; }
.title { fill: #132238; font: 700 42px Arial, sans-serif; }
.sub { fill: #4b5f76; font: 500 24px Arial, sans-serif; }
.step { fill: #ffffff; stroke: #cbd8e6; stroke-width: 3; }
.active { fill: #e4f7ee; stroke: #21895e; stroke-width: 4; }
.rotated { fill: #fff3d9; stroke: #bd7b18; stroke-width: 4; }
.revoked { fill: #fde8e8; stroke: #bd3d4a; stroke-width: 4; }
.label { fill: #132238; font: 700 28px Arial, sans-serif; }
.body { fill: #344b64; font: 500 23px Arial, sans-serif; }
.note { fill: #7b3040; font: 700 22px Arial, sans-serif; }
.arrow { stroke: #53718e; stroke-width: 7; fill: none; marker-end: url(#sessions-auth-2023-lifecycle-arrow); }
.thin { stroke: #bd3d4a; stroke-width: 5; fill: none; stroke-dasharray: 12 11; marker-end: url(#sessions-auth-2023-lifecycle-red-arrow); }
</style>
<defs>
<marker id="sessions-auth-2023-lifecycle-arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto"><path d="M0,0 L12,6 L0,12 Z" fill="#53718e"/></marker>
<marker id="sessions-auth-2023-lifecycle-red-arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto"><path d="M0,0 L12,6 L0,12 Z" fill="#bd3d4a"/></marker>
</defs>
<rect class="bg" width="1200" height="760" rx="34"/>
<text class="title" x="64" y="78">Одна сессия: issue → rotation → logout</text>
<text class="sub" x="64" y="118">Серверный record принимает решение; cookie переносит только текущий ID.</text>
<rect class="active" x="64" y="208" width="270" height="214" rx="22"/>
<text class="label" x="92" y="264">1. Вход</text>
<text class="body" x="92" y="310">fixture-s-1</text>
<text class="body" x="92" y="346">status: active</text>
<text class="body" x="92" y="382">generation: 1</text>
<path class="arrow" d="M342 315 H459"/>
<rect class="rotated" x="472" y="208" width="270" height="214" rx="22"/>
<text class="label" x="500" y="264">2. Rotation</text>
<text class="body" x="500" y="310">fixture-s-1</text>
<text class="body" x="500" y="346">status: rotated</text>
<text class="body" x="500" y="382">successor: s-2</text>
<path class="arrow" d="M750 315 H867"/>
<rect class="active" x="880" y="208" width="270" height="214" rx="22"/>
<text class="label" x="908" y="264">3. Current</text>
<text class="body" x="908" y="310">fixture-s-2</text>
<text class="body" x="908" y="346">status: active</text>
<text class="body" x="908" y="382">generation: 2</text>
<rect class="step" x="98" y="538" width="320" height="126" rx="20"/>
<text class="note" x="126" y="588">stale rotate/logout</text>
<text class="body" x="126" y="628">s-1 → reject, s-2 не меняется</text>
<path class="thin" d="M258 532 C334 483 490 472 626 439"/>
<path class="arrow" d="M1015 430 V522"/>
<rect class="revoked" x="814" y="538" width="336" height="126" rx="20"/>
<text class="label" x="842" y="588">4. Logout current s-2</text>
<text class="body" x="842" y="628">revoked + clear cookie</text>
</svg>