You are not logged in.
Pages: 1
// I don't know whether it's a mistake on my part or something else. Here, "HOST" can only be in uppercase; lowercase doesn't yield any data.
Host := Ctxt.Call^.Header('HOST:')
Also, are there any examples of TAuthGroup + TAuthUser + MongoDB
Offline
It is documented as such.
This is part of the optimization of header names lookup.
This is truly perplexing and very prone to causing mistakes.
Could we make a change so that friends who come later won't waste time checking for mistakes at this place?
Offline
Also, are there any examples of TAuthGroup + TAuthUser + MongoDB
What are you looking for exactly?
Offline
testgary wrote:Also, are there any examples of TAuthGroup + TAuthUser + MongoDB
What are you looking for exactly?
I'm looking to see how others write related code so I can learn from it.
Thank you very much for your reply.
Offline
this is how i create my TRestServerDB:
constructor TCoreServiceRestServer.Create;
var Model: TOrmModel;
Cli: TMongoClient;
begin
Model := TOrmModel.Create([TAuthUser, TAuthGroup, ...], 'app');
inherited Create(Model, True);
SessionClass :=TAuthSession; // Custom TAuthSession
Cli := TMongoClient.Create(DB_ADDRESS, DB_PORT);
Cli.ConnectionTimeOut := 0;
Cli.GracefulReconnect := True;
Cli.OpenAuth('admin', DB_USER, DB_PASSWORD);
OrmMapMongoDBAll(Self.OrmInstance, Cli.Open('core')); // 'core' is my collection's name
Server.CreateMissingTables;
end;Offline
Pages: 1