-
Notifications
You must be signed in to change notification settings - Fork 31
/
config.js
86 lines (76 loc) · 1.86 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import * as fs from 'fs';
import * as path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const SSL_CERT_DIRECTORY = path.join(__dirname, './ssl/cert');
export default {
port: 1812,
// radius secret
secret: 'testing123',
certificate: {
cert: fs.readFileSync(path.join(SSL_CERT_DIRECTORY, '/server.crt')),
key: [
{
pem: fs.readFileSync(path.join(SSL_CERT_DIRECTORY, '/server.key')),
passphrase: 'whatever2020',
},
],
// sessionTimeout: 3600,
// sesionIdContext: 'meiasdfkljasdft!',
// ticketKeys: Buffer.from('123456789012345678901234567890123456789012345678'),
},
// GoogleLDAPAuth (optimized for google auth)
authentication: 'GoogleLDAPAuth',
authenticationOptions: {
base: 'dc=hokify,dc=com',
// get your keys from http://admin.google.com/ -> Apps -> LDAP -> Client
tls: {
keyFile: 'ldap.gsuite.key',
certFile: 'ldap.gsuite.crt',
},
},
/** LDAP AUTH
authentication: 'LDAPAuth',
authenticationOptions: {
url: 'ldaps://ldap.google.com',
base: 'dc=hokify,dc=com',
tls: {
keyFile: 'ldap.gsuite.key',
certFile: 'ldap.gsuite.crt'
},
tlsOptions: {
rejectUnauthorized: false,
requestCert: false,
},
},
*/
/** static auth
authentication: 'StaticAuth',
authenticationOptions: {
validCredentials: [
{ username: '[email protected]', password: 'test' },
{ username: '[email protected]', password: 'password' },
{ username: '[email protected]', password: 'cool' },
],
},
*/
/** VLAN CONFIG
vlan: 400,
*/
/** SMTP AUTH
authentication: 'IMAPAuth',
authenticationOptions: {
host: 'smtp.gmail.com',
port: 465,
useSecureTransport: true,
validHosts: ['gmail.com']
}
*/
/** HTTP AUTH
authentication: 'HTTPAuth',
authenticationOptions: {
url: 'https://my-website.com/api/backend-login'
}
*/
};