3.12.7. HTTP_AuthenticationHook Previous topic Parent topic Child topic Next topic

This optional parameter defines a Perl hook for API authentication. Defaults to not set. When HTTP_AuthenticationHook is configured, HTTP_AuthenticationScheme is ignored. The hook is passed the following arguments:
  • Reference to the current Radius::HTTPClient derived clause
  • Reference to an instance of HTTP::Request class representing the API request being currently built
The first parameter provides access to the configuration parameters, such as username and password shown in this example.
# API access requires HTTP authentication
HTTP_AuthenticationHook file:"%D/http-auth-hook.pl"
HTTP_Username mikem
HTTP_Password fred