feat: enforce private backend isolation, deploy live interactive SOC Gateway UI, and provide English security report
This commit is contained in:
@@ -6,7 +6,6 @@ async function getAuth() {
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(tokenFile, 'utf8'));
|
||||
if (data.expiresAt && new Date(data.expiresAt) > new Date(Date.now() + 60000)) {
|
||||
console.log('Using cached token, expires at:', data.expiresAt);
|
||||
return data;
|
||||
}
|
||||
} catch (e) {}
|
||||
@@ -36,6 +35,10 @@ async function getAuth() {
|
||||
return tokenData;
|
||||
}
|
||||
|
||||
getAuth()
|
||||
.then(d => console.log('Auth success for user:', d.userId))
|
||||
.catch(e => console.error('Auth error:', e.message));
|
||||
module.exports = { getAuth };
|
||||
|
||||
if (require.main === module) {
|
||||
getAuth()
|
||||
.then(d => console.log('Auth success for user:', d.userId))
|
||||
.catch(e => console.error('Auth error:', e.message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user