Generate and store JWT secret in DB

This commit is contained in:
aditya.chandel
2025-03-08 16:25:17 -07:00
parent a562701c43
commit 7da452e4eb
6 changed files with 106 additions and 16 deletions
@@ -2,12 +2,6 @@ app:
path-book: '/app/books'
path-config: '/app/config'
security:
jwt:
secret: G6u4m3g7M/b93k7m9a1h1Kw4l3D+5WqXldpl4nTjl4s=
expiration: 36000000 # 10 hours in milliseconds
refreshExpiration: 604800000 # 7 days in milliseconds
spring:
servlet:
multipart:
@@ -1,3 +1,10 @@
CREATE TABLE IF NOT EXISTS jwt_secret
(
id SERIAL PRIMARY KEY,
secret TEXT NOT NULL,
created_at TIMESTAMP DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS library
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,