add fast-jwt ( not tested ) and make the user actual register
All checks were successful
Code quality checks / biome (push) Successful in 8s
All checks were successful
Code quality checks / biome (push) Successful in 8s
This commit is contained in:
parent
f93cef442a
commit
57fb8d8bb1
10 changed files with 227 additions and 27 deletions
|
@ -24,17 +24,30 @@ const cassandra: CassandraConfig = {
|
|||
authEnabled: process.env.CASSANDRA_AUTH_ENABLED === "false",
|
||||
};
|
||||
|
||||
const jwt: JWTConfig = {
|
||||
secret: process.env.JWT_SECRET || "",
|
||||
expiration: process.env.JWT_EXPIRATION || "1h",
|
||||
issuer: process.env.JWT_ISSUER || "",
|
||||
algorithm: process.env.JWT_ALGORITHM || "HS256",
|
||||
};
|
||||
|
||||
function verifyRequiredVariables(): void {
|
||||
const requiredVariables = [
|
||||
"HOST",
|
||||
"PORT",
|
||||
|
||||
"REDIS_URL",
|
||||
"REDIS_TTL",
|
||||
|
||||
"CASSANDRA_HOST",
|
||||
"CASSANDRA_PORT",
|
||||
"CASSANDRA_CONTACT_POINTS",
|
||||
"CASSANDRA_AUTH_ENABLED",
|
||||
"CASSANDRA_DATACENTER",
|
||||
|
||||
"JWT_SECRET",
|
||||
"JWT_EXPIRATION",
|
||||
"JWT_ISSUER",
|
||||
];
|
||||
|
||||
let hasError = false;
|
||||
|
@ -52,4 +65,4 @@ function verifyRequiredVariables(): void {
|
|||
}
|
||||
}
|
||||
|
||||
export { environment, cassandra, redisTtl, verifyRequiredVariables };
|
||||
export { environment, cassandra, redisTtl, verifyRequiredVariables, jwt };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue