feat: Google Drive backup OAuth (Faz 1 — backend)

PRD "AyrisLegal Google Drive Backup & Recovery" kapsamında sadece
backend altyapısı: OAuth connect/callback/status/disconnect/refresh
uç noktaları, AES-256-GCM token şifreleme (tokenCrypto.ts), tek
kullanımlık CSRF state (oauthState.ts), drive.file scope ile
AyrisLegal/Davalar klasör oluşturma (googleDriveClient.ts). Electron
tarafı (dosya tarama/kuyruk/UI) ayrı bir aşamada.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
mstfyldz
2026-08-10 03:51:02 +03:00
co-authored by Claude Sonnet 5
parent 9618ff4513
commit 328aef91bd
6 changed files with 430 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import { Router } from 'express';
import { requireAuth } from '../middleware/auth';
import { connect, oauthCallback, getStatus, disconnect, refresh } from '../controllers/googleDrive.controller';
const router = Router();
// Google'ın doğrudan (Bearer token olmadan) yönlendirdiği tek public uç nokta.
router.get('/oauth/callback', oauthCallback);
router.get('/connect', requireAuth, connect);
router.get('/status', requireAuth, getStatus);
router.post('/disconnect', requireAuth, disconnect);
router.post('/refresh', requireAuth, refresh);
export default router;