<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Michael Van Canneyt via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> schrieb am Mo., 25. Feb. 2019, 08:07:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On Mon, 25 Feb 2019, Sven Barth via lazarus wrote:<br>
<br>
> Michael Van Canneyt via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank" rel="noreferrer">lazarus@lists.lazarus-ide.org</a>> schrieb am<br>
> So., 24. Feb. 2019, 17:46:<br>
><br>
>><br>
>> Hello,<br>
>><br>
>> We received some feedback about Pas2JS - our effort to bring Pascal to the<br>
>> browser - that easy database connectivity is an issue, hampering easy<br>
>> development.<br>
>><br>
>> To alleviate the problem I have created the SQLDB Rest bridge.<br>
>><br>
>> This is a set of components that allow you to expose any database supported<br>
>> by FPC's SQLDB as a REST service. It is designed to be simple to use, yet<br>
>> extensible.<br>
>><br>
><br>
> Cool! Great work!<br>
> Now I only need to get the parts for implementing an Interface using RTTI<br>
> working and I'd be all but set :D<br>
<br>
You mean for an RPC mechanism ?<br>
<br>
Isn't Invoke() working already ? I have a JSON RPC implemention on my list,<br>
and thought to use Invoke() for that.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">RTTI.Invoke() itself is working as is TRTTIMethod.Invoke(), so the server side wouldn't be a problem, but what I'm still missing is TVirtualInterface for the client side. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> HTTP:<br>
>> * Authentication is handled using the HTTP protocol.<br>
>><br>
>> * Basic authentication is included by default, but is completely pluggable.<br>
>><br>
>> * Basic authentication can look up valid users in a database (by default<br>
>> the database being exposed)<br>
>><br>
><br>
> How would one check whether the user is allowed to execute an action?<br>
<br>
There is an OnAllowResource event, after the authentication. One of the<br>
parameters is the operation: GET, PUT etc.<br>
If you set the 'allow' to false, you'll get a 403, 'Forbidden'. <br>
It's not yet committed, because I wanted that together with the business processor component, <br>
which will make implementing all kinds of events simpler. <br>
There are stilll several improvements waiting to be tested and committed.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Great! Looking forward to that! </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>