bericht/api/logout.php
Eddy 960cee4be4
All checks were successful
Deploy bericht / deploy (push) Successful in 14s
Bericht-API: SSO-Migration auf awlauth (JWT -> awl_sso-Cookie)
- _inc.php: api_authenticate() nutzt awlauth_require(bericht,read) inkl.
  same-origin-CSRF; CORS (Access-Control-Allow-Origin:*) entfernt (mit
  Cookies unzulaessig + bei same-origin ueberfluessig).
- auth.php: Login ueber awlauth_login/issue -> HttpOnly-Cookie awl_sso,
  kein Token mehr im Body.
- photo.php/pdf.php: GET-Binaer ueber awlauth_verify (kein CSRF, da auch
  per window.location/<object> geladen); Bearer/jwt-Query-Auth entfernt.
- shipments.php: unveraendert (nutzt api_authenticate -> awlauth_require).
- neu: logout.php (Single-Logout), verify.php (sliding session).
- _jwt.php geloescht (JWT vollstaendig abgeloest).

[deploy]
2026-07-06 15:24:42 +02:00

12 lines
379 B
PHP

<?php
/* POST /api/logout.php — löscht das zentrale SSO-Cookie awl_sso.
* Meldet den Benutzer damit aus allen AWL-Apps ab (Single-Logout).
*/
require_once __DIR__.'/_inc.php';
if (!dol_include_once('/awlauth/lib/awlauth.lib.php') || !function_exists('awlauth_clear_cookie')) {
api_fail('SSO-Modul (awlauth) nicht verfügbar', 500);
}
awlauth_clear_cookie();
api_ok();