Apache-AuthenRadius
view release on metacpan or search on metacpan
AuthenRadius.pm view on Meta::CPAN
# Radius Server and port.
my $host = $r->dir_config("Auth_Radius_host") or return DECLINED();
my $port = $r->dir_config("Auth_Radius_port") || 1647;
my $ident = $r->dir_config("Auth_Radius_ident") || 'apache';
my $ip = inet_ntoa(gethost($r->hostname)->addr);
# Shared secret for the host we are running on.
my $secret = $r->dir_config("Auth_Radius_secret") or return DECLINED();
# Timeout to wait for a response from the radius server.
my $timeout = $r->dir_config("Auth_Radius_timeout") || 5;
# Create the radius connection.
my $radius = Authen::Radius->new(
'Host' => "$host:$port",
'Secret' => $secret,
'TimeOut' => $timeout,
);
# Error if we can't connect.
( run in 0.232 second using v1.01-cache-2.11-cpan-4d50c553e7e )