You are not logged in.
Pages: 1
Hi!
I'm new to Delphi and mORMot...
I'm trying samples and everything seems to work as expected.
After some data insert from Project4Client.exe I try to GET some data from RESTclient/browser
10.0.0.100:8080/root
10.0.0.100:8080/root/SampleRecord
10.0.0.100:8080/root/SampleRecord/1
But I get this error instead of JSON data:
{
"ErrorCode":"403",
"ErrorText": "Forbidden"
}
There is some authentication to setup in the browser? I'm doing something wrong?
I'm using Delphi7/RAD Studio XE2 with the same result.
Thanks!
Mauro
Offline
OK!
as for Version 1.16
-- added authentication to the remote process
In the client I see this login/pwd: User / synopse
but from RESTclient using Basic Authentication I'm facing the same error...
How can I disable aHandleUserAuthentication in the server just to test the connection?
Offline
according to documentation, which you can easy found here: http://synopse.info/fossil/wiki?name=Do … umentation (direct link http://synopse.info/files/pdf/Synopse%2 … 201.17.pdf ) mORMot don't use HTTP auth at all. Please, read documentation or see the comments in source codes (in interface part of SQLite3Commons TSQLRestServer.Create). In sample project you are talking about you can easy turn off auth by change this line of code in unit2.pas
DB := TSQLRestServerDB.Create(Model,ChangeFileExt(paramstr(0),'.db3'), FALSE {aHandleUserAuthentication});
Offline
Thanks it worked!
After reading “1.4.4.1.3. Authentication” in http://synopse.info/files/pdf/Synopse%2 … 201.17.pdf mORMot REST authentication is more clear to me now!
I think that the current “1.4.3.1.2.3. REST and JSON” example in the same doc it’s not correct because it doesn’t mention authentication at all.
Mauro
Offline
You are right: I've just fixed documentation about "REST and JSON".
In order to have it working as written, authentication shall be disabled first.
See http://synopse.info/fossil/info/3773230b33
Thanks for the report.
Offline
Pages: 1