Add auth, JWT tokens, and bootstrap startup

Introduce bootstrap entrypoint and prestartup to ping DB and generate/manage RSA keypair. Add security module for key IO. Implement JWT-based access and refresh tokens (tokensService) with refresh_tokens table and repo. Add auth, provider and user services, and refresh-token management. Update repositories (users, credentials, providers, servers) with SQL fixes and new helper methods. Move DDL execution to bootstrap (remove from server). Update package.json main and add dependencies (bcryptjs, jsonwebtoken). Update .env.example and .gitignore accordingly.
This commit is contained in:
2026-09-02 01:55:58 +02:00
parent 7a87a98c82
commit 22542243f6
20 changed files with 686 additions and 28 deletions
+3 -1
View File
@@ -13,7 +13,7 @@
"email": "gilleslazure04@gmail.com"
},
"type": "commonjs",
"main": "server.js",
"main": "bootstrap.js",
"scripts": {
"start:dev": "nodemon .",
"start": "node .",
@@ -23,12 +23,14 @@
"homepage": "https://gitea.azures.fr/azures04/Base-REST-API",
"readme": "https://gitea.azures.fr/azures04/Base-REST-API/src/branch/main/README.md",
"dependencies": {
"bcryptjs": "^3.0.3",
"colors": "^1.4.0",
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"helmet": "^8.3.0",
"hpp": "^0.2.3",
"jsonwebtoken": "^9.0.3",
"mariadb": "^3.5.3",
"path-to-regexp": "^8.4.2",
"zod": "^4.4.3"