Updated frontend
This commit is contained in:
+25
-2
@@ -3,8 +3,11 @@
|
||||
module.exports = {
|
||||
name: "Theta42 SSO",
|
||||
userModel: 'ldap', // pam, redis, ldap
|
||||
redis: {
|
||||
prefix: 'sso_manager_'
|
||||
},
|
||||
ldap: {
|
||||
url: 'ldap://10.1.0.55:389',
|
||||
url: 'ldaps://ldap.internal.theta42.com:636',
|
||||
bindDN: 'cn=admin,dc=theta42,dc=com',
|
||||
bindPassword: '__IN SRECREST FILE__',
|
||||
userBase: 'ou=people,dc=theta42,dc=com',
|
||||
@@ -12,5 +15,25 @@ module.exports = {
|
||||
userFilter: '(objectClass=posixAccount)',
|
||||
userNameAttribute: 'uid'
|
||||
},
|
||||
SENDGRID_API_KEy: '__IN SRECREST FILE__',
|
||||
oauth: {
|
||||
issuer: 'https://sso.theta42.com',
|
||||
jwtSecret: '__in secrets file__',
|
||||
token_lifetime: {
|
||||
access_token: 3600, // 1 hour (seconds)
|
||||
refresh_token: 2592000 // 30 days (seconds)
|
||||
}
|
||||
},
|
||||
voipms: {
|
||||
username: '__in secrets file__',
|
||||
password: '__in secrets file__',
|
||||
did: '__in secrets file__',
|
||||
},
|
||||
smtp: {
|
||||
host: 'mail.wgnode.com',
|
||||
port: 587,
|
||||
secure: false,
|
||||
user: 'noreply@users.theta42.com',
|
||||
pass: '__in secrets file__',
|
||||
from: 'Theta42 Accounts <noreply@users.theta42.com>',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const extend = require('extend');
|
||||
|
||||
const environment = process.env.NODE_ENV || 'development';
|
||||
|
||||
function load(filePath, required){
|
||||
try {
|
||||
return require(filePath);
|
||||
} catch(error){
|
||||
if(error.name === 'SyntaxError'){
|
||||
console.error(`Loading ${filePath} file failed!\n`, error);
|
||||
process.exit(1);
|
||||
} else if (error.code === 'MODULE_NOT_FOUND'){
|
||||
console.warn(`No config file ${filePath} FOUND! This may cause issues...`);
|
||||
if (required){
|
||||
process.exit(1);
|
||||
}
|
||||
return {};
|
||||
}else{
|
||||
console.dir(`Unknown error in loading ${filePath} config file.\n`, error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = extend(
|
||||
true, // enable deep copy
|
||||
load('./base', true),
|
||||
load(`./${environment}`),
|
||||
load('./secrets'),
|
||||
{environment}
|
||||
);
|
||||
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
redis: {
|
||||
prefix: 'sso_manager_test_'
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user