Auth-Fundament: JWT + Redis (Phase 1, non-breaking)
Vorbereitung für pod-unabhängige Sessions (k8s-Ziel). Ändert am Live-System NICHTS: AUTH_BACKEND='session' bleibt Default, die neuen Libs sind noch nirgends verdrahtet. - composer eingeführt: firebase/php-jwt ^6.11 + predis/predis ^2.4 (pure PHP, keine Redis-Extension nötig → läuft auf XAMPP wie im Prod-Image). vendor/ committed (kein Composer auf dem Server). - Jwt.php: HS256-Access-Token (issue/verify), decode() IMMER mit explizitem Algorithmus (mitigiert Algorithmus-Confusion). 8/8 Tests grün. - SessionStore.php: predis-gestützter Session/Refresh-Store (sess:<sid>, Sliding-TTL, revoke=DEL) — die widerrufbare Session hinter dem kurzen JWT. - app.php: vendor/autoload (guarded), Konstanten AUTH_BACKEND (Default session), REDIS_URL, JWT_TTL, JWT_REFRESH_TTL. JWT_SECRET bewusst ohne Default. - docker-compose.dev.yml: Redis (+ redis-commander UI) für lokale Dev-Parität. - .env.example um Auth-Block ergänzt. Nächste Phasen: $_SESSION-Zugriffe (293) durch Session:: kanalisieren → Backend-Umschalter in Session.php → doppelgleisiger Cutover → Reporting auf student_id-FK ziehen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
|
||||
"homepage": "https://github.com/firebase/php-jwt",
|
||||
"keywords": [
|
||||
"php",
|
||||
"jwt"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Neuman Vong",
|
||||
"email": "neuman+pear@twilio.com",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Anant Narayanan",
|
||||
"email": "anant@php.net",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"require": {
|
||||
"php": "^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present",
|
||||
"ext-sodium": "Support EdDSA (Ed25519) signatures"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Firebase\\JWT\\": "src"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"psr/cache": "^2.0||^3.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user