mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 02:25:59 +00:00
17 lines
268 B
JavaScript
17 lines
268 B
JavaScript
const crypto = require('crypto');
|
|
|
|
const tokenSecret = crypto.randomUUID();
|
|
|
|
function getTokenLifetime() {
|
|
return process.env.TOKEN_LIFETIME || '1d';
|
|
}
|
|
|
|
function getTokenSecret() {
|
|
return tokenSecret;
|
|
}
|
|
|
|
module.exports = {
|
|
getTokenLifetime,
|
|
getTokenSecret,
|
|
};
|