You are not logged in.
Hi AB,
i have an Idea and want to know what you are thinking about it.
ATM i'm using IndyHttpServer für a little WebServer service. Now i'm enhancing this service with mORMot and think about replacing the IndyhttpServer Komponent with the mORMot one.
The only thing I'm missing is some Session Handling Stuff as in Indy.
ATM i create a Session Object in TIdHttpSession to store some Session Data.
Would it be interesting / Possible to include some Session Handling in mormot http server ?
Rad Studio 12.1 Santorini
Offline
Sry for the delay, had to look in the sources...
Yes in low-level SynCrtSock as in Indy. If cookies are necessary i don't know. I only want to create support a self generated "web-site" and the mORMot functionality in one service-exe.
The web-site (delphi part) should connect to the database as the client which snchronises with the service-data.
Rad Studio 12.1 Santorini
Offline
You have session and cookies, together with our Mustache template engine, available at mORMot server.
I doubt we would benefit to implement it again at SynCrtSock lowest level.
Offline
I think this post is going into the wrong direction...
What i want to do with mORMot is to write a http - WebSite with login.
After Login every logged in user should see its specific data.
Simultaneous login from multiple clients should be possible.
For Login i dont want to create the wheel again and use TAuthUser/Group (or a derived class)
Is it possible you create a little sample http - WebServer(service) which shows this ?
It would show how to login with http and would show the mormot session handling.
Thank you very much
Rad Studio 12.1 Santorini
Offline
For authentication, the easiest is to register TSQLRestServerAuthenticationHttpBasic on the server side.
Then a method-based service to return generated HTML content.
The currently logged user, and all needed authentication information is available from ServiceContext.Request threadvar (e.g. in SessionUser / SessionUserName sub-fields).
Then you can return the HTML content corresponding to the data, using ORM methods and Mustache as template engine.
Offline