#1 2015-06-30 17:40:29

avista
Member
Registered: 2014-01-06
Posts: 63

Custom Authentication For Two REST Server Instances

I have two servers based on TSQLRestServerFullMemory.

One is interface based, and one is method based. 

I've implemented a custom authentication scheme to get data from an existing database.

The problem I'm encountering is that when registering these two servers, it's mandatory that I use a different Root URI for each one.  That's fine, however I want to share the authentication session between the two server instances.  The reason I'm using the method based service in addition to the interface based one is that I need to provide download services for binary file data, and only the method based service supports that. This is also a problem if I want to create additional services for different sub-domains, for purposes of modularity, since I'd also need to authenticate each URI separately, which is problematic. (e.g., 'root/myservice', 'root/myservice/fileservices', 'root/myservice/otherservices').

Is there a way to authenticate once, regardless of server instance/root URI, and then re-use that instance (by using the same signature) for for calling these services, instead of having to authenticate separately and initiate a separate auth session for each server instance?  Or do I need to put everything in a single method based server instance and handle all of the URI parsing in that service?

Thanks,
Doug

Offline

#2 2015-06-30 17:52:29

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

Re: Custom Authentication For Two REST Server Instances

AFAIK you can provide binary download feature with interface-based services.
See http://synopse.info/files/html/Synopse% … #TITLE_427
Only upload is not possible (yet) with interface based services.

But you can have both method-based services and interface-based services on the very same TSQLRestServer.
So you would be able to share authentication.
Did you test that?

Offline

Board footer

Powered by FluxBB