#1 2017-01-10 11:48:18

Xj307
Member
Registered: 2016-12-28
Posts: 5

How to dynamically change the users during service operation?

I use mORMot to write a service program, the create code is as follows:

  fModel := TSQLModel.Create([TSQLAuthUser, TSQLAuthGroup],ROOT_NAME);
  fRestServer := TSQLRestServerFullMemory.Create(fModel,false);
  ServiceFactoryServer := fRestServer.ServiceDefine(TRestMethods,[IRestMethods], SERVICE_INSTANCE_IMPLEMENTATION);
  fRestServer.AuthenticationRegister(TSQLRestServerAuthenticationDefault);

At the start of service dynamically add user and user group information based on user tables in the database,
The problem is that I changed(update,delete or insert) the user information in the database,
How can I dynamically change the server and user and user group settings during service operation?

Thanks!

Offline

#2 2017-01-10 16:03:15

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

Re: How to dynamically change the users during service operation?

The user is set by the authentication process, so it is to be done on the client side.

Offline

Board footer

Powered by FluxBB