#1 2020-04-09 03:58:55

Flashcqxg
Member
Registered: 2018-01-11
Posts: 31

TSQLDBServerHttpApi And Session verification

Hello:
I am a new user of mormot,and more interested in TSQLDBServerHttpApi.
I want to use redis as a session manager for TSQLDBServerHttpApi,clients that have not passed session authentication cannot access the TSQLDBServerHttpApi server,BUT:

1) How to combine this redis session manager with TSQLDBServerHttpApi?
2) How does the client carry the session to access TSQLDBServerHttpApi

Thanks!

Offline

#2 2020-04-09 08:30:09

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

Re: TSQLDBServerHttpApi And Session verification

You can create your own TSynAuthenticationAbstract-inherited class, then supply it on the TSQLDBServerHttpAPI.Create constructor.
You would need to override TSynAuthenticationAbstract.CheckCredentials I guess.

On the client side, you would need to override TSQLDBProxyConnectionPropertiesAbstract.SetInternalProperties and set the fProtocol with the proper TSynAuthenticationAbstract instance.

The follow patch is needed to specify your own TSynAuthenticationAbstract instance:
https://synopse.info/fossil/info/3c8fedf874

Offline

#3 2020-04-09 13:52:58

Flashcqxg
Member
Registered: 2018-01-11
Posts: 31

Re: TSQLDBServerHttpApi And Session verification

Thank you,i'll try to do it.

Offline

Board footer

Powered by FluxBB