forked from simllll/node-radius-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
77 lines (69 loc) · 1.63 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
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require('fs');
const path = require('path');
const SSL_CERT_DIRECTORY = path.join(__dirname, './ssl/cert');
module.exports = {
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: {
servername: 'ldap.google.com'
}
}
*/
/** IMAP AUTH
authentication: 'IMAPAuth',
authenticationOptions: {
host: 'imap.gmail.com',
port: 993,
useSecureTransport: true,
validHosts: ['hokify.com']
}
*/
/** 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'
}
*/
};