]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update sample rest module
authorNick Porter <nick@portercomputing.co.uk>
Fri, 11 Jul 2025 16:21:35 +0000 (17:21 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 11 Jul 2025 17:06:01 +0000 (18:06 +0100)
doc/antora/modules/reference/pages/raddb/mods-available/rest.adoc
raddb/mods-available/rest

index bfaca7ce750f667a4900efbd882704792d71fa31..3cd2f5d958ebcb4e8b065d8a286356c547d1a6ea 100644 (file)
@@ -174,16 +174,12 @@ chunk:: Max chunk-size.
 The following config items can be used in each of the sections.
 The sections themselves reflect the sections in the server.
 
-For example, if you list `rest` in the `authorize` section of a `virtual server`,
-the settings from the `authorize` section here will be used.
+For example, if you list `rest` in the `recv Access-Request` section of a `virtual server`,
+the settings from the `recv access-request` section here will be used.
 
-The following sections are supported:
-
-- `authorize { ... }`
-- `authenticate { ... }`
-- `accounting { ... }`
-- `post-auth { ... }`
-- `xlat { ... }`
+Where sections have two parts to the name, if a section which matches both names is not
+found, then one using just the first name will be looked for.  E.g. a call in `accounting Start`,
+will look for `accounting start` and fall back to `accounting`.
 
 At the top level of each section, the following config items may be listed:
 
@@ -331,7 +327,7 @@ any calls to this module's `xlat` function.
 
 
 
-### Authorize { ... }
+### recv { ... }
 
 Default action when called in `recv` sections except `recv Accounting-Request`.
 
@@ -373,7 +369,7 @@ Default action when called in `recv Accounting-Request` or `accounting` sections
 
 
 
-### Post-Auth { ... }
+### send { ... }
 
 Default action when called in `send` sections.
 
@@ -449,7 +445,7 @@ rest {
        xlat {
                tls = ${..tls}
        }
-       authorize {
+       recv {
                request {
                        uri = "${...connect_uri}/user/%{User-Name}/mac/%{Called-Station-ID}?section=authorize"
                        method = 'GET'
@@ -470,7 +466,7 @@ rest {
                }
                tls = ${..tls}
        }
-       post-auth {
+       send {
                request {
                        uri = "${...connect_uri}/user/%{User-Name}/mac/%{Called-Station-ID}?action=post-auth"
                        method = 'POST'
index 8b2bb631bdc4a59df1d35f03406a65c338ab89cc..f65d32e30bb7efca6970b5086416347e54c2518b 100644 (file)
@@ -196,16 +196,12 @@ rest {
        #  The following config items can be used in each of the sections.
        #  The sections themselves reflect the sections in the server.
        #
-       #  For example, if you list `rest` in the `authorize` section of a `virtual server`,
-       #  the settings from the `authorize` section here will be used.
+       #  For example, if you list `rest` in the `recv Access-Request` section of a `virtual server`,
+       #  the settings from the `recv access-request` section here will be used.
        #
-       #  The following sections are supported:
-       #
-       #  - `authorize { ... }`
-       #  - `authenticate { ... }`
-       #  - `accounting { ... }`
-       #  - `post-auth { ... }`
-       #  - `xlat { ... }`
+       #  Where sections have two parts to the name, if a section which matches both names is not
+       #  found, then one using just the first name will be looked for.  E.g. a call in `accounting Start`,
+       #  will look for `accounting start` and fall back to `accounting`.
        #
        #  At the top level of each section, the following config items may be listed:
        #
@@ -356,7 +352,7 @@ rest {
        }
 
        #
-       #  ### Authorize { ... }
+       #  ### recv { ... }
        #
        #  Default action when called in `recv` sections except `recv Accounting-Request`.
        #
@@ -373,7 +369,7 @@ rest {
        #  | xxx  | -            | no            | invalid
        #  |===
        #
-       authorize {
+       recv {
                request {
                        uri = "${...connect_uri}/user/%{User-Name}/mac/%{Called-Station-ID}?section=authorize"
                        method = 'GET'
@@ -419,13 +415,13 @@ rest {
        }
 
        #
-       #  ### Post-Auth { ... }
+       #  ### send { ... }
        #
        #  Default action when called in `send` sections.
        #
        #  Return codes handled the same as `Accounting { ... }`
        #
-       post-auth {
+       send {
                request {
                        uri = "${...connect_uri}/user/%{User-Name}/mac/%{Called-Station-ID}?action=post-auth"
                        method = 'POST'