You are not logged in.
I decided to move from regular fastmm4 to mORMot version. After I configured it according to my needs (inc file) I'm getting hints:
[Hint] FastMM4.pas(6718): Value assigned to 'LLockLargeBlocksLocked' never used
[Hint] FastMM4.pas(7212): Value assigned to 'LMediumBlocksLocked' never used
{$ifndef AssumeMultiThreaded}
if IsMultiThread then
{$endif}
begin
LLockLargeBlocksLocked := True;
{$ifdef LogLockContention}ADidSleep:={$endif}
{Insert the large block into the linked list of large blocks}
LockLargeBlocks;
end;
I defined:
{$define AssumeMultiThreaded}
in inc file.
@ab, are you making changes on 2.0 version of mORMot too?
I need advice on how to implement this scenario: I have an application server that stores a lot of information, e.g. logged in users (with their statuses, sessions), conversation history between them, daily statistical data, etc. In case of server failure, I lose everything after server restart. I have an idea to move all objects to the MongoDB database and instead of storing in local objects, store in the database and in case of failure after restarting the server (or switching to another server) the data is just still available from the MongoDB database. The question is whether this is a good way and whether mongoDB is an effective enough base to integrate with it so much. This is a revolutionary decision so I must be sure this is a good way.
I bought the 2nd edition from amazon.de, thx.
How the mORMot deal with database connection lost. I'm going to use it with MS SQL and set the ORM to async mode. What's happening if I'll cut the cable between ORM machine and database, the OLE DB I'm using does not inform about connection problems.
For now I can't change the authentication method in our current system, I would like to migrate from indy http server to mORMot, so that's why I'm asking about default http basic authorization based on token stored in cookies.
Can someone help me implement standard http authentication?
1. End-user send the username+password through the request headers (Authorization: Basic xxxxxxxxxxxx)
2. Server creates the session token and send the create cookie request to the client
3. Every request from client must contain cookie session token
All communication will be secured by https.
OK, lets look at first google link:
https://blog.restcase.com/4-most-used-r … n-methods/
Basic Authentication:
"With this method, the sender places a username:password into the request header."
Bearer Authentication:
"Similarly to Basic authentication, Bearer authentication should only be used over HTTPS (SSL)."
API Keys:
"Many API keys are sent in the query string as part of the URL, which makes it easier to discover for someone who should not have access to it. Please do not put any API keys or sensitive information in query string parameters! A better option is to put the API key in the Authorization header."
So, where did you see the authentication data sent by plain text via url?
You are not right, all web urls and query parameters can be easily read by network administrator.
I can't understand the security based on session_signature. After the user log-in each request must contain ?session_signature=xxxxxxxxxx. But....I can simply copy the link to other browser and run the same link without authentication. Even someone can sniff the network to intercept my requests and open the same page. Shouldn't we put the session_signature in header to hide it by SSL?
8.2.6. Remote access via HTTP
"The transmission protocol uses an optimized binary format..." , how can I send query from web browser and retrieve results? I suppose the SynDBRemote is a solution for pure delphi client-server apps.
Damn, you are right, my synopse.inc pointed to the old SynGDIPlus folder (also containing synopse.inc) which has been added to delphi environment as search path.
Hello,
I would like to pass the select statement with params from the web browser. The backend uses THttpApiServer to serve the json response. The JSONSQLClient demo works fine when I pass the plain query statement without params through the body.
Is this possible to pass for example json with params such as:
{
"query":"select * from users where name=? and id > ?",
"params":["john","6"]
}
It does not work on my colleague computers too so I don't think this is a problem with my environment. I've added:
{$DEFINE CPUX86}
{$DEFINE NOHTTPCLIENTWEBSOCKETS}
to synopse.inc to make it work.
Strange, did you changed something in configuration files after downloading fresh Mormot repository? How to you compile TestSQL3, command line? What conditionals you are talking about?
File mORMot.pas
type
TFakeCallStack = packed record
ParamRegs: packed array[PARAMREG_FIRST..PARAMREG_LAST] of pointer;
end;
[Error] mORMot.pas(54582): Undeclared identifier: 'PARAMREG_FIRST'
--------------
RegisterIdent := PARAMREG_RESULT;
[Error] mORMot.pas(55565): Undeclared identifier: 'PARAMREG_RESULT'
-------------
Compiled under Delphi 7 Ent, 64 Bit Windows 7, CPU386