12.1. Loading and configuring Previous topic Parent topic Child topic Next topic

When radiusd sees an <AuthBy XYZ> clause while parsing a Realm or Handler, it will load the file Radius/AuthXYZ.pm with a Perl require. AuthXYZ.pm is expected to be a Perl package that implements the class Radius::AuthXYZ. Realm.pm will then instantiate a new Radius::AuthXYZ by calling the constructor with Radius::AuthXYZ->new($file). The constructor is expected to create an instance of Radius::AuthXYZ that can handle all the requests for that type of authentication.
The constructor is passed a filehandle $file, which is the configuration file being currently read. The constructor is expected to configure its instance from lines read from the configuration file up until it sees a </AuthBy> line. This is made very easy by the Radius::Configurable class, which your AuthBy module should inherit from.
If the Radius::AuthXYZ constructor fails, it is expected to return undef.