12.4. Step-by-step Previous topic Parent topic Child topic Next topic

Assuming you want to create a custom AuthBy module called XYZ, these are the basic steps:
  • Figure out what parameters your new module needs from the Radiator configuration file to configure its behaviour.
  • Copy AuthTEST.pm to AuthXYZ.pm.
  • Replace all instances of TEST in AuthXYZ.pm with XYZ.
  • Implement the keyword function so it parses the parameters that your new module needs.
  • If your module needs any sub-objects, implement the object function to parse out any sub-objects (see example code in Radius::Realm->object).
  • Implement the handle_request function. You may wish to handle Access-Requests and Accounting-Requests differently.
  • Add a test realm to the configuration file with something like:
    <Realm xxxxxx>
          RealmParameter1 ....
          <AuthBy XYZ>
                AuthByParameter1 ....
                .....
          </AuthBy>
    </Realm>
  • Restart or SIGHUP Radiator.
  • Test your new module by sending requests to the server with the radpwtst utility.
  • Install your new module with make install.
If your authentication method is simple and synchronous, your class only has to override the following methods in AuthGeneric:
  • new Create a new instance by calling $class->SUPER::new($file);
  • keyword Recognise any class specific parameter keywords from the configuration file and remember them.
  • findUser Construct and return a User object if the named user can be found in your database.