]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update sample lua module configuration
authorNick Porter <nick@portercomputing.co.uk>
Thu, 24 Apr 2025 11:31:35 +0000 (12:31 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 24 Apr 2025 13:42:33 +0000 (14:42 +0100)
raddb/mods-available/lua

index 36d99be6c752cbdc021cd8381d108f903c917de6..7a5f8929b0ae20513db5e3c32d4e886d96521698 100644 (file)
 #  * Please see the `src/modules/rlm_lua/example.lua` for a sample Lua script.
 #  * Please see https://www.lua.org/ for more information about the Lua language.
 #
-#  NOTE: Uncomment any `func_*` configuration items below which are
-#  included in your module. If the module is called for a section which
-#  does not have a function defined, it will return `noop`.
+#  The Lua function names called when the `lua` module is called are
+#  automatically derived from the section in which they are called.
+#
+#  If `lua` is called in `recv Access-Request`, firstly a function
+#  `recv_access_request` will be looked for.  If that does not exist, then
+#  a function `recv` will be looked for.
+#
+#  This can be overridden by setting `func_recv_access_request` or `func_recv`
+#  to point to a different function name.
 #
 
 #
@@ -27,14 +33,12 @@ lua {
        filename = ${modconfdir}/${.:instance}/example.lua
 
        #
-       #  NOTE: Uncomment func_<section> lines that have methods in your lua module.
+       #  func_instantiate:: Called on module instantiation.
        #
-       func_authenticate = authenticate
-       func_authorize = authorize
-#      func_preacct = preacct
-#      func_accounting = accounting
-#      func_post_auth = post_auth
-#      func_xlat = xlat
 #      func_instantiate = instantiate
+
+       #
+       #  func_detach:: Called on module unload.
+       #
 #      func_detach = detach
 }