#1 2025-04-17 09:52:19

jiwi
Member
Registered: 2025-04-17
Posts: 1

OpenAPI client working example? Also with OAuth2?

Hello,

I've found the mORMot 2 OpenAPI client generator (which is by the way, awesome!) and managed to generate the client/dto units, but I'm stuck trying create an actual working client.

Does anybody have an example, maybe for the PetStore swagger demo?

Also, for the API that I'll be using I'll need to implement authorization with OAuth2 client_credentials flow (https://auth0.com/docs/get-started/auth … tials-flow). Are there any working examples for that maybe, or can someone point me in the right direction?

Thanks a lot!

Offline

#2 2025-04-17 12:17:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,966
Website

Re: OpenAPI client working example? Also with OAuth2?

It depends on how OAUth2 is actually implemented.

But in practice, you just add the JWT to the HTTP auth bearer of the TJsonClient, once you received it.

Offline

Board footer

Powered by FluxBB