mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 07:06:00 +00:00
auth provider refactor
This commit is contained in:
@@ -2,10 +2,15 @@ const crypto = require('crypto');
|
||||
|
||||
const tokenSecret = crypto.randomUUID();
|
||||
|
||||
export function getTokenLifetime() {
|
||||
function getTokenLifetime() {
|
||||
return process.env.TOKEN_LIFETIME || '1d';
|
||||
}
|
||||
|
||||
export function getTokenSecret() {
|
||||
function getTokenSecret() {
|
||||
return tokenSecret;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getTokenLifetime,
|
||||
getTokenSecret,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user