feat: кнопка Выйти → /logout (OIDC) с предупреждением о SSO
- Возвращена кнопка в user.ejs, href=/logout вместо /v2/logout - confirm() перед выходом: предупреждает что завершатся ВСЕ сессии Nubes - /logout → destroy сессии Express → редирект на Keycloak OIDC logout v0.1.10 → v0.1.11
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ipwhitelist",
|
"name": "ipwhitelist",
|
||||||
"version": "0.1.10",
|
"version": "0.1.11",
|
||||||
"description": "IP WhiteList microservice for cloud provider",
|
"description": "IP WhiteList microservice for cloud provider",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// ═══════════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
version: '0.1.10',
|
version: '0.1.11',
|
||||||
|
|
||||||
// ── IAM ──────────────────────────────────────────────────────────────────
|
// ── IAM ──────────────────────────────────────────────────────────────────
|
||||||
iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user',
|
iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user',
|
||||||
|
|||||||
+3
-5
@@ -124,11 +124,9 @@
|
|||||||
|
|
||||||
<span style="margin-left:auto;display:flex;gap:.5rem;align-items:center;">
|
<span style="margin-left:auto;display:flex;gap:.5rem;align-items:center;">
|
||||||
<span style="font-weight:500;color:var(--text);"><%= user.email %></span>
|
<span style="font-weight:500;color:var(--text);"><%= user.email %></span>
|
||||||
<!-- Кнопка выхода скрыта: /v2/logout не разлогинивает из Keycloak (только сессия Express).
|
<a href="/logout" class="btn btn-sm"
|
||||||
Правильный OIDC-логаут с редиректом на KC — в src/routes/oidc.js:/logout.
|
onclick="return confirm('Выход из whitelist завершит ВСЕ сессии Nubes (Keycloak SSO).\n\nПродолжить?')"
|
||||||
Когда будет реализован полноценный SSO-логаут — раскомментировать.
|
title="Выход из Keycloak (все сервисы Nubes)">Выйти<% if (user.isImpersonated && user.originalUserEmail) { %> (<%= user.originalUserEmail %>)<% } %></a>
|
||||||
<a href="/v2/logout" class="btn btn-sm">Выйти<% if (user.isImpersonated && user.originalUserEmail) { %> (<%= user.originalUserEmail %>)<% } %></a>
|
|
||||||
-->
|
|
||||||
</span>
|
</span>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user