#1 Re: mORMot 2 » The https service of mormot2 threw an exception » 2026-05-08 09:35:54

Yes of course, and what you mean by "the service cannot work properly"?   Try to first accept un-safe cert from the browser, I mean, just open the url of the service api call on a browser-tab, accept un-safe connection once, then api calls will work.

// - secTLS will use HTTPS secure connection (user-provided self-signed or not)
// - secTLSSelfSigned will use HTTPS secure connection with a (temporary) self-signed certificate (will generate an temporary self-signed certificate at startup)

#2 Re: mORMot 2 » The https service of mormot2 threw an exception » 2026-05-08 08:39:30

it's expected for a self-signed certificate, you should be able to read SEC_E_CERT_UNKNOWN / error 87. It means windows/SChannel cannot validate the certificate chain or certificate trust state. Ignore at debugger level. You can also add the certificate to your host store and test again (for the science..).

#3 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-05-03 15:08:24

ttomas wrote:

I just reproduce in Linux with 8 threads, need to click for a long time :-), and yes happen after Begin/End CurrentThread.

yes ok - confirmed on my side too.

#4 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-05-03 13:25:07

Im not on computer atm, will tell you that in an hour or so as I dont remember.

#5 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-05-03 12:49:22

Kabiri wrote:

... it happens randomly ...

it's happening each run if using a good workload. no exception, it happen always.

and useHttpAsync doesn't suffer from it.

i saved screenshots yesterday:
bds-5b-F2z5-Fmn-L.png bds-KDvc0-Hv-AAV.png bds-n-Ok-Xx-E241-V.png bds-SCBK0-Wh-FEW.png

#6 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-05-03 12:37:39

I reproduced it with sample on #60 - on Delphi 12.3 (not tested against fpc yet) and only with useHttpSocket. If you set thread pool to, eg. 8 you can get the issue quite fast. On delphi, debugger almost stay silent and program hung. If an instance of the services is registered on server, with the orm instance passed on constructor, then the debugger can catch the AV easily on delphi 12.3.

#7 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-05-02 09:33:57

Kabiri wrote:

The database connection is set up like this:

{$ifdef DBZeos}
  DBProps := TSqlDBZeosConnectionProperties.Create('zdbc:postgresql://' + Host,DBName, DBUser, DBPass);
{$else}
  DBProps := TSqlDBPostgresConnectionProperties.Create(Host, DBName, DBUser, DBPass);
{$endif}
DBProps.UseCache := False;
DBProps.ReconnectAfterConnectionError := True;

but where?

please share the small "reproducible" sample you made the other day.

while writing this, I'm currently working on a hobby project - a custom RAG system that ingests all the mormot code into a postgre database using the pgvector extension. It uses an async http server, orm, and soa, and I haven't had any issues with many worker threads so far.

#8 Re: mORMot 2 » ai superpowers for mormot2 » 2026-04-28 13:21:01

Thanks @zen. I remember now that you mentioned the BMAD method in another thread. I also remember that, after reading the README, I wanted to actively test it but then I completely forgot to do it! sad

Thanks for the reminder - I'll definitely give it a real try, and maybe eventually publish something specialized in the same way I did for superpowers.

#9 Re: synopse.info » Forum suggestion - responsive feature for mobile » 2026-04-28 10:53:54

Asking the following here so this post also go to the top - just in case big_smile

@ab: About the blog, could you add an url rewriting or something to fix links, eg.

/post to /?post 

---

If someone want to fix the navigation on the blog and forum automatically until its fixed, I published a (mobile-friendly) Tampermonkey-script. If you buy the app ($3) on iOS, it work on Safari - you can find the script on github, just import/copy-pasta it on your mobile:

https://gist.github.com/flydev-fr/f02bd … f77d9b42d6

The second gist comment contain a script for the blog only fix in order to not mess the forum style on desktop browser.

Mobile preview:
https://i.ibb.co/B2hfw6H3/IMG-0873.png
https://i.ibb.co/kVrhRPsC/IMG-0874.jpg

#10 Re: mORMot 2 » ai superpowers for mormot2 » 2026-04-26 16:56:03

Ok, let me write a better README, and I'll take the time to make a screencast or video comparing both runs: without, and with the plugin.

I assume you’re not familiar with the superpowers plugin. Do you use claude-code yourself?

#11 mORMot 2 » ai superpowers for mormot2 » 2026-04-26 12:06:45

flydev
Replies: 4

I forked obra/superpowers into a Pascal/Delphi+FPC variant specialized for mORMot2 - so it work for claude, codex or gemini, etc.

Repo: https://github.com/flydev-fr/mormot2-superpowers

What it adds:
  - 10 domain skills that route prompts to real mORMot 2 idioms, and a Pascal-aware code-reviewer agent.
  - /mormot2-doc <topic> that resolves topic names ("torm", "rest", "ecc", "ddd", "logging", ...) or chapter numbers to local SAD chapter excerpts (to be improved / automated / reviewed) and will pull @zen010101 wiki soon.
  - /delphi-build and /fpc-build that wrap dcc32/dcc64/MSBuild and fpc/lazbuild with mORMot 2 search paths injected automatically.
  - TSynTestCase-only test discipline. /mormot2-test does not run DUnitX/FPCUnit/TestInsight (deliberate).
  - Cross-platform: Windows (Delphi + FPC), Linux, macOS.

Quick example:

> Add a TOrm class for a User with email and role fields
[Skill: mormot2-orm loaded]
[generates a TOrmUser with RawUtf8 fields, stored AS_UNIQUE on email,
the right index attribute, and tells you how to register it on a TOrmModel]

Windows-Terminal-I2-Gmc-CPW3e.png

You can tests from your shell:

pwsh -File tests/run-quick.ps1

Note: the upstream methodology layer (planning, TDD, subagent-driven development) is preserved unchanged; the Pascal/mORMot layer is the new bit.

Feedback welcome - especially on missing idioms, wrong class names, or trigger-eval misroutes. Open an issue or reply here cool

@zen010101

#12 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-04-26 08:56:14

The logs you just posted here only show what was already in your very first message, as also mentioned in the quote from my reply #16.

Kabiri wrote:
flydev wrote:

Just sayin, without any code to read and/or reproducible sample it's really hard to help.. if you have any ai tool at hand then just ask it to extract a sample, and even better, install a debugging skill on it and throw it on your codebase.

I created a sample code, but it didn’t produce any errors.

What I tried to ask there was not a new or overly simple piece of code, but a reproducible sample based on your actual code, with the relevant services, server initialization, database initialization, and related code simplified as much as possible.

What I mean is: if your code is not top-secret, copy your project, simplify it until the issue still happens, provide some dummy data, and then share it here privately if needed. By doing that, you will likely be able to identify where the issue really occurs.. or we will be able to help you and not only guess things as we already know the root cause.

#13 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-04-23 13:32:19

Just sayin, without any code to read and/or reproducible sample it's really hard to help.. if you have any ai tool at hand then just ask it to extract a sample, and even better, install a debugging skill on it and throw it on your codebase.

#14 Re: mORMot 2 » mORMot + PostgreSQL: "lost synchronization with server" when switching » 2026-04-18 09:35:58

...in message type "T" server sent data "D" message without prior row description ("T" message)

the message itself really give hint about what @daniel is suggesting: wrong multi-thread usage.

you really need to give more information and eliminate causes. First answer @ab and tell us:

- version of libpq in use

then,
- check if is zeos-specific by running the same sql:
  1. psql,
  2. pgAdmin,
  3. a tiny test executable using only one connection and one thread

- eliminate the dll ambiguity:
  1. copy the chosen libpq.dll to the EXE folder (keep only the dependent DLLs required by that build)
  2. temporarily rename any other libpq.dll reachable through PATH


But again, it seem to be a thread issue:

inference from the protocol behavior and Tom Lane’s explanation wrote:

Same connection used concurrently from multiple threads
If two threads share one PostgreSQL connection or one query object and interleave reads/writes on the same socket, the message stream becomes corrupted from the client’s perspective. The symptom often looks exactly like “unexpected message type while idle” or “DataRow without prior RowDescription,” because packets are being attributed to the wrong command.

https://www.postgresql.org/docs/current … -flow.html

#15 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-04-11 12:51:16

Ah good find! I forgot to leave a word on the other thread after pushing it smile

#16 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-04-10 16:48:37

I added a small extension to mormot.core.os that is "discussed" there. No patch needed, it just work as is.

@ab I will send the PR about the markdown patches soon. I fixed a bug recently and I have to finish to write the missing tests based on the 677 examples of the gfm spec to make the patches solids.

#17 Re: mORMot 2 » RunRedirect feature request(stdin) » 2026-04-08 19:33:20

@vs I needed the same features to test some ai automation flows. Try the branch "feat/stdin-pipe" from my fork. You'll find an "external-process" example in the ex folder that runs on both linux and windows. The example is based on your comments above. There are also tests, so you can compile it on windows and run both the tests and the sample.

FYI: the fork is based on mormot 2.4.14669 (current is 2.4.14720) - I still need to merge the latest commits from the synopse repo, as the version I used seems to cause a segfault when starting TSynDictionary tests on ubuntu.

see: mormot.core.os.pas#L6114-L6199

Let me know how its goes smile

edit: added a dedicated ffmpeg sample, you can read the tests project output there: https://pastebin.com/F57yWgHd

#19 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-03-14 15:57:56

Yes, of course. I will prepare a couple of patches and open a PR next week for your review.

ab wrote:

Note: I am currently investigating about creating some new units, one being mormot.core.fmt.pas in which I would put this HTML/md code, and also INI support. The other unit could be mormot.core.store.pas in which I will move TSynDictionary/TSynNameValue from mormot.core.json.pas.

That makes sense, at least to me.

#20 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-03-14 04:51:27

I checked, tested it by adding it to the demo, and also read the reference. I now remember that I forgot to check it again against HtmlEscapeMarkdown(). I used this code a few years ago in a project where I needed full GFM support for an integrated editor.

In the core HtmlEscapeMarkdown(), the most notable missing feature is heading support, which is important and should be added imo.

See, first image is HtmlEscapeMarkdown(), second in the extension/GFM: https://imgur.com/a/eLaPCbH

The spec for the GFM dialect is there: https://github.github.com/gfm/

#21 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-03-13 20:19:59

I completely missed that code! I even thought we didn’t have Markdown support.
I’ll take a look later on my computer - and as you said, I’m sure there are already some parts duplicated.

My version supports the GitHub dialect, including extensions like tables, checklists, etc.

I’ll check..

#22 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-03-13 09:22:04

I've just added a new single-unit extension for processing markdown. It supports the common markdown dialects as well as GitHub Flavored Markdown (GFM). A VCL demo is included so you can experiment with it.

This extension was primarily created because I've long wanted to build a static site generator powered by mormot. You'll be able to see it in action in a MVC project that should be released this weekend. It will serve the documentation for the mormot-extensions repo (btw, I still need to brainstorm on the cli tool).

With this approach, only two mustache templates was made and documentation can simply be published as markdown files on the server, or updated automatically through a ci/cd pipeline after pushing changes to a git repository.

#23 Re: mORMot 2 » Moving from Desktop to Client/Server » 2026-03-12 10:00:50

Take a look there about using GUID as FK: https://github.com/synopse/mORMot2/issues/431

For your scenario, you want to study mormot SAD chapter 5.10 and ingesting 5.10.4. Replication use cases, then write programs for experimenting.

#24 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-02-21 15:53:08

igors233 wrote:

So MCP is kind of a standard  that AI agents already knows and you just add support for what you need from your ERP side.

Exactly.

In the video there was not skill involved, I just connected the MCP (from the demos folder) and asked the agent to return my ip available mcp tools ("public_ip" that return ip and time, see there).

But a skill could have been set to tell the agent what to use and what to call when asked to return a public ip. You can read on @openai codex repo or claude cli, etc to see how they write skills there. I suggest you to read an introduction on what are skills, maybe on anthropic or openai blog, doesn't matter.

igors233 wrote:

Do you know of a system that could be run locally, without paid subscription and create good results?

I will not get into hardware things, you know that if you run things on CPU it will be slow as f*** - that's said, you have a lot of available tools like ollama, lama.cpp, lmstudio.

To get started I recommend LM Studio:
- Really easy to use. It's easy to fetch, load and experiment different open source models - you can even literally paste the url of a model from huggingface.co into the app, it will download and be ready to use. You can also start an api server from the app to interact with.

I suggest you start with following models: Mistral, Llama 3, or Qwen and for more models look there, @TheBloke's published models

- fun but experimental, stay with Pascal: https://github.com/BeRo1985/pasllm

#25 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-02-21 11:24:25

A real example on this page, there is a public tool that allows parking users to retrieve their payment receipt using their vehicle license plate and the parking date.

If the given plate is not found exactly, the system can return a list of similar plates based on our own logic. Then AI use:
- an MCP tool to query and retrieve this candidate set,
- a dedicated Skill to analyze the results and determine the most probable correct receipt.

Another real world example I'm currently experimenting is AI support through a SIP server:
- realtime model answer support calls by voice.
- the model get access to a particular parking resources based on enabled modules: could be the existing license plates stored on local computer (from where the call happen), an issue with their member's badge, etc.

In this case:
- SIP server model is connected to the MCP and get dedicated backend services (plates, badge-numbers, some hardware statuses, etc.)
- Skill handles the reasoning, understands the caller request, and generates the proper spoken response or trigger a notifications so an human get involved.

Again, MCP handles the data access, and the Skill handles the intelligent decision.

realtime models is a version of GPT - capable of responding to audio and text inputs in realtime over WebRTC, WebSocket, or SIP connections.

As I said, possibilities are endless big_smile

#26 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-02-21 10:46:40

MCP servers are cool. MCP is not an AI model. It's more a bridge that gives the model access to tools, local or remote (and i'm sure you already heard about Skills too).

For example, with an MCP you can expose a tool so the model can fetch specific data from your REST service (for example using "orm.RetrieveDocVariantArray()"), and then analyze this data with a dedicated Skill.

If we take the mvc-blog sample:

- the MCP gives the model a tool to return a list of posts based on your own criteria,
- the Skill lets the model act like an analytics expert and produce a summary.

We could then automate the SEO and posting of our blog - you can see how the model could update or rewrite articles with this kind of flow:

1. MCP: get analytics data from your Google SearchConsole
2. Skill: analyze low-ranked articles
3. MCP: fetch the articles from your system
4. Skill: analyze the content and think about improvements
5. MCP: update the post in the database

So the Skill handles the thinking and SEO logic, and the MCP handles the access to real data and real actions.


Another example: if your MCP exposes tools like "FindWindow()", "MoveMouse()", "SendKey()", etc. then the model could really interact with your computer.

So basically:

Skill = how the model thinks (expert logic).
MCP = what the model can do (actions).

Most of the time you need both: a skill for reasoning, and an MCP to connect and act in the real world. Possibilities are endless.

#27 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-02-17 08:17:00

I'm also on a rush, last sprint! let's focus. On end of march you then find an experimentation that give to agents access to the computer resources, like opening softwares, switching between window with keyboard/mouse input. I already made a test where the agent open mspaint and start drawing, it was funny to watch big_smile

I see I didn't put any link to the repo on my last message as I didn't made a link on mormot ex yet. Added winsparkle wrapper, and a TOTP implementation will be added this week, quite useful.

For people interested, repo is there: https://github.com/flydev-fr/mormot2-extensions

#29 Re: mORMot 2 » new samples for mormot2, any rules? » 2026-02-08 20:10:15

I still haven't made a PR yet, but a public repo is finally live where some "extensions" as i'm calling them will be added. The extensions listed as upcoming will be pushed this week after adding a readme before pushing.

For now, you can find a pure mormot2 MCP implementation that works on windows and linux and can be compiled with Delphi (at least 12.3) and FPC. Just start with the tests then the demos.

@zen010101 I hope you will test this one!

#30 Re: mORMot 2 » More mORMot2 examples: adapted from DMVCframework » 2025-12-29 10:41:17

Hello everyone,

first of all, thanks Javierus for throwing tokens into this set of samples!

disclaimer: I really don't want to sound like a party pooper tongue

IMHO, when samples are generated with AI models, we should enforce a simple rule: the sample should include its own tests.

Not to annoy anyone, but rather for quality reasons, and to avoid potential frustration for new users. As @rcla already mentioned, there are still errors. I personally tested two samples (26-middleware_analytics and 51-react), and neither of them worked, tested with Delphi 12.3 and FPC.

My opinion, having non-working samples in the official repository can negatively impact how newcomers perceive mormot when they just want to try things out. I strongly believe in quality over quantity. I'm allowing myself to say this because, just this week, I tried again to give FMX (with Alcinoe) a LAST chance for an iOS/Android project... failed miserably and ended up coding the apps natively with Xcode/Swift and Android Studio, simply because the IDE combined with the libraries (and the samples) generated too much frustration  (remember that gif?)

giphy.gif

The only thing that works exactly as I expect, without complaining, is my mORMot servers big_smile


ab wrote:

...
Worth a common discussion...

To me I liked @mpv idea suggested in this topic.


Yeah, I know... in the end, I am a bit of a party pooper lol lol

#31 Re: mORMot 2 » Captcha » 2025-11-04 09:06:36

You could enhance your scheme with a basic auth > OTP > JWT flow.

#32 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-31 08:30:14

Got it, I read a thread about it and found the og templates.

My previous comment still apply, add your security schemes and security prop to paths like how its explained in the doc (anyway you have to look at the doc of swagger v2).

#33 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-30 10:08:56

Yes! big_smile

You could create a thread and share with us how you set up this mustache mORMotClient.json thing, it's interesting and you could get better help then. I'am not familiar with this one and I didn't even know how to get this defintion file. I remember only a thread about something related..

#34 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-30 09:47:34

You need to add securitySchemes and then defining a scheme on your auth endpoint (path). Just check swagger doc.

#35 Re: mORMot 2 » Question: Modifying OutCustomHeaders in GetViewInfo ? » 2025-10-29 14:36:15

ttomas wrote:

For MVC app you can add parameter CustomOutHttpHeader to your public methods. @ab add this future when I need  response header for htmx application.

procedure TMyMVCApplication.Test(... , out CustomOutHttpHeader: RawUtf8); 
begin
  ...
  CustomOutHttpHeader := 'HX-Retarget: #dialog';
end;

nice gem.
Was about to ask this, thank you!

#36 Re: mORMot 2 » Questions from a noob trying to do a RESTful API » 2025-10-18 12:39:10

I might have read your post in diagonal and misunderstood some parts of it - will read it again big_smile

#37 Re: mORMot 2 » Questions from a noob trying to do a RESTful API » 2025-10-18 11:41:21

you dont have to, you can consume interface based services with any client. For example, apply this patch to the sample and just call /find like

curl 'http://127.0.0.1:11111/find?name=test

and /add

curl http://127.0.0.1:11111/add \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "test",
  "question": "This is a test?"
}'

#38 Re: mORMot 2 » Questions from a noob trying to do a RESTful API » 2025-10-16 08:43:34

hi gcarreno,

gcarreno wrote:

Alas, the MVC example produces HTML pages. My WEB API will only produce JSON...

Append `/json` at the end of the url to see what happen smile  (it was primarly made for debugging purpose, but it can be consumed as is too).

What about the question about database migration?

I wrote some parts of rock migration, a module used by ProcessWire community (I am pretty sure you know it) so I can clearly see what you have in mind. As you already mentioned, things turn a bit different with a compiled approach but not that much I think.

I've just published a very minimal example here showing how to compare current model table with external table fields to remove orphaned columns. Then, imagine you set up a proper ci/cd pipelnie for example with jenkins and fpc, you could write migration files to be consumed by your flow, compile, deploy. And as mormot is able to serialize any class/record into a json object, writing a migration module similar to what you’d have on cakephp to keep or rollback your db/api definition should be ok. Anyway, nothing native yet big_smile 

Hope this points you in more or less the right direction lol

#39 Re: mORMot 2 » ESChannel exception » 2025-10-14 15:30:09

Small update. I migrated the certificate and fixed the server config, previous error not gone, but a new one:

14/10/2025 17:06:49.512	Enter	70	 mormot.rest.http.client.TRestHttpClientSocket(01b84970) CallBackGet api/timestamp
14/10/2025 17:06:49.512	Enter	70	    mormot.rest.http.client.TRestHttpClientSocket(01b84970) InternalUri GET
14/10/2025 17:06:49.512	Exception	70	 ENetSock {LastError:"nrClosed",Message:"THttpClientSocket.SockInReadLn [#5 Closed]"} [TTicketPull sagas] at 016a2f45 mormot.net.sock.pas TCrtSocket.Bind (5841)  mormot.core.os.windows.inc XorOSEntropy (2311) mormot.core.os.windows.inc XorOSEntropy (2316)  {4 0.27 0.76 8 645.8MB/1.7GB 1db10a01}
14/10/2025 17:06:50.160	Client	70	       mormot.rest.http.client.TRestHttpClientSocket(01b84970) GET api/timestamp status=200 len=12 state=0
14/10/2025 17:06:50.160	Leave	70	    00.654.548

Then I patched two machines TLS with KB3140245, and imported missing intermediate certs into Windows 7/10 clients and then no more SEC_E_MESSAGE_ALTERED.

#40 Re: mORMot 2 » ESChannel exception » 2025-10-13 13:39:58

Idk if the following is related and could give some hints. I have the same issue on Windows 7; Recently, we switched new deployed computers on Windows 10 and the same issue is happening.

The current http server is apache reverse proxy for a specific reason using a Sectigo RSA certificate. Actually, I havn't tried to fix it, but I observed the following:
- on my own computer, the error isn't triggered.
- some months ago, I could fix it on Windows 7 by registering missing certs on the local certificate store.

So on my side, I suspect a problem on the certificate chain. I will have more info in the next day as we have renewed the certificate and I will update the server conf.

25/06/2025 07:49:02.464	Enter	73	 mormot.rest.http.client.TRestHttpClientSocket(77b1a0).CallBackGet api/timestamp
25/06/2025 07:49:02.464	Enter	73	    mormot.rest.http.client.TRestHttpClientSocket(77b1a0).InternalUri GET
25/06/2025 07:49:03.560	Exception	73	       ESChannel {Message:"<the.domain.fr>: HandshakeStep returned 8009030F [SEC_E_MESSAGE_ALTERED], System Error 5 [ERROR_ACCESS_DENIED]"} [] at 01285bdf mormot.net.sock.windows.inc TSChannelNetTls.ESChannelRaiseLastError (1927)   {65529.79 4.99 12 0.8GB/2GB 1db10a01}
25/06/2025 07:49:03.560	Exception	73	       ESChannel {Message:"recv: Handshake aborted"} [] at 01285d26 mormot.net.sock.windows.inc TSChannelNetTls.FreeAndCheckSocket (1948)   {65529.79 4.99 12 0.8GB/2GB 1db10a01}
25/06/2025 07:49:03.560	Exception	73	       ESChannel {Message:"recv: Handshake aborted"} [] at 01285d26 mormot.net.sock.windows.inc TSChannelNetTls.FreeAndCheckSocket (1948)   {65529.79 4.99 12 0.8GB/2GB 1db10a01}
25/06/2025 07:49:03.560	Client	73	       mormot.rest.http.client.TRestHttpClientSocket(77b1a0) GET api/timestamp status=666 len=0 state=0
25/06/2025 07:49:03.560	Leave	73	    01.102.694
25/06/2025 07:49:03.560	Enter	73	    mormot.rest.http.client.TRestHttpClientSocket(77b1a0).InternalUri GET
25/06/2025 07:49:04.720	Client	73	       mormot.rest.http.client.TRestHttpClientSocket(77b1a0) GET api/timestamp status=200 len=12 state=0
25/06/2025 07:49:04.720	Leave	73	    01.173.370
25/06/2025 07:49:04.720	Service return	73	    mormot.rest.http.client.TRestHttpClientSocket(77b1a0) 135919590467
25/06/2025 07:49:04.720	Leave	73	 02.276.213

The issues I'm aware of (using ssl tools):
- The chain doesn't contain any intermediate certificates

#41 Re: mORMot 2 » mORMot2 (2.3 stable) fail to create x64 package » 2025-10-08 14:18:23

@FlaviusFX, I think it's related to the following, I remember it was fixed a few days later after the release, read issues #306 on github.

#42 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-08 08:56:27

This is beyond the scope of jwt thing, you didn't described how you are adding user and I then assume you are adding manually an user into the external auth user table: if ORM cache is enabled, then this behavior is expected. You could read that you are hitting orm cache on the console by enabling server logs (and by reading the manual).

Thats said, set db.usecache to false or write a small rest client tool for adding your users..

#43 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-07 09:13:30

I can help your but put some efforts smile
just share the file

#44 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-07 06:37:21

I see, your file is probably missing something or contain a bad formatting. Swagger doesn't care about the server itself, it's about the file definition.

#45 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-06 16:28:33

I dont understand this one sorry - if you mean swagger editor, you will get a button if you define some security schemes.  Which api definition are  you talking about ?

#46 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-06 12:42:05

Yes I've read your comment (I edited it on the PR smile )  It was not really a bug but a change on the framework implementation. I didn't had the time to push my changes and merging @koraycayiroglu code.

Is it possible to create interface based service for authentication and use it in client side?

Yes you can, just register your service with bypassauthentication true. On the initial sample they were implemented as service methods as I think it fit better to access service context. You can mix both interface/service methods without problem.

#47 Re: mORMot 2 » How can I get secret from TJwtHS256? » 2025-10-05 16:12:17

The secret is the same as the param you set on TJwtHS256.Create if SecretPbkdf2Round is 0. If you didn't modified the public example then a new secret is generated on each server start and it's the sha256 hash of a random guid, see there.

Just set a breakpoint and copy the value, or echo the key on the console (or generate a new hash from a dummy secret) and then copy paste the key on jwt.io, you should get a valid signature.

#48 Re: mORMot 2 » lists in objects to Json » 2025-10-01 08:08:04

Personal taste, I feel more comfortable using IDocDict/List. Maybe take a look at this blog post if it helps (check the advanced features: filtering, searching):

https://blog.synopse.info/?post/2024/02 … hi-and-FPC

#49 Re: mORMot 2 » Issue with SetUser after introducing Modular Crypt » 2025-09-30 10:42:03

Indeed, I forgot this one big_smile

It's working as expected smile

#50 Re: mORMot 2 » Issue with SetUser after introducing Modular Crypt » 2025-09-30 10:06:08

Hi @ab, I did some testing - Delphi 12.3 and FPC - and then:

- without rsoPerConnectionNone, client auth is fine (this was failing).
- enabling rsoPerConnectionNone, client fail at CheckPassoword()

fServer.fOptions:

[rsoNoInternalState,rsoNoTableURI,rsoMethodUnderscoreAsSlashUri,rsoPerConnectionNonce]
srvr       mormot.rest.server.TRestServerRoutingRest(0334c340)   Method GET root/auth?username=Admin=200 out=77 B in 3.09s
ret         ServerApiHost.TAppServer(033e9f40) Method len=77 {"result":"bd1a5ead8e255448fd09484e56e33a66ea8cefc3f6d3804735cb6cf7a46881c0"}
[debug] GET /root/auth?username=Admin&password=e23f6a5756da303c6b36de49077cb51d6828768a2763b0b82678122deba05ac8&clientnonce=58671B01_0fb7691644db0de2e1bd776ed8466eb2
[BeforeBody][aInHeaders]: 
  - X-Real-IP: 127.0.0.1
  - X-Forwarded-For: 127.0.0.1
  - X-Forwarded-Proto: https
  - X-Conn-ID: 17
  - Accept: */*

Board footer

Powered by FluxBB