Added session duration handling

This commit is contained in:
Alex Rennie-Lis
2024-04-09 13:26:55 +01:00
parent 2b7fbfdebd
commit 3a58c19c44
2 changed files with 5 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ catch (error) {
client_secret: "password",
default_vlan_enabled: false,
mac_auth_only: false
session_duration: 60
}
}
if (process.env['NETRADIUS_PORT_RADIUS_AUTH']) config.ports.radius_authentication = process.env['NETRADIUS_PORT_RADIUS_AUTH'];
@@ -40,6 +41,7 @@ if (process.env['NETRADIUS_DEFAULT_VLAN']) config.default_vlan_enabled = process
if (process.env['NETRADIUS_DEFAULT_VLAN_ID']) config.default_vlan_id = process.env['NETRADIUS_DEFAULT_VLAN_ID'];
if (process.env['NETRADIUS_CLIENT_SECRET']) config.client_secret = process.env['NETRADIUS_CLIENT_SECRET'];
if (process.env['NETRADIUS_MAC_AUTH_ONLY']) config.mac_auth_only = process.env['NETRADIUS_MAC_AUTH_ONLY'];
if (process.env['NETRADIUS_SESSION_DURATION']) config.session_duration = process.env['NETRADIUS_SESSION_DURATION'];
// Set defaults
if (!config.ports.radius_authentication) config.ports.radius_authentication = 1812;