TsgcWSPServer_Dataset › Properties › RPCAuthentication
Optional allow-list of RPC methods and matching users required to execute them.
property RPCAuthentication: TsgcWSAuthentication_Methods read FRPCAuthentication write SetRPCAuthentication;
—
When Enabled is True, every incoming RPC call is first checked against the Methods list. Each entry is either a bare method name (allowed for any authenticated user) or a method=user pair (allowed only for that authenticated user). Methods that do not match any entry trigger the OnRPCAuthentication event so the handler can decide at runtime; if the event is not assigned or the handler returns False, the server replies with a JSON-RPC "Method not found" error. When Enabled is False every method is accepted.
oProtocol.RPCAuthentication.Enabled := True;
oProtocol.RPCAuthentication.Methods.Add('ping');
oProtocol.RPCAuthentication.Methods.Add('admin=root');