You are not logged in.
Pages: 1
define two interface
ISystem = interface(IInvokable)
['{B75F244D-AB62-42A3-AE87-BDB9DA346871}']
function HelloWorld(): string;
function Hi(sName:string): string;
function Sum(val1, val2: Double): Double;
end;
IRestMethods = interface(IInvokable)
['{4EB49814-A4A9-40D2-B85A-137DDF43C72C}']
function HelloWorld(): string;
function Hi(sName:string): string;
function Sum(val1, val2: Double): Double;
end;
ServiceFactoryServer := fRestServer.ServiceDefine(TSystem, [ISystem], SERVICE_INSTANCE_IMPLEMENTATION);
ServiceFactoryServer := fRestServer.ServiceDefine(TRestMethods, [IRestMethods], SERVICE_INSTANCE_IMPLEMENTATION);
authorization is base on method, now , the conflict coming as you can imagine.
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
base on @George 's demo
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
ServiceFactoryServer := fRestServer.ServiceDefine(TSystem, [ISystem], SERVICE_INSTANCE_IMPLEMENTATION);
ServiceFactoryServer := fRestServer.ServiceDefine(TRestMethods, [IRestMethods], SERVICE_INSTANCE_IMPLEMENTATION);
this two lines are problems , how to get the ServiceFactoryServer include all Interfaces ?
the authorization function's parameter seems required a method name .
function AllowByID(const aMethod: array of RawUTF8; const aGroupID: array of TID): TServiceFactoryServer;
function AllowByName(const aMethod: array of RawUTF8; const aGroup: array of RawUTF8): TServiceFactoryServer;
==============
where can I found a Interface based authorization demo ?
Last edited by linbren (2017-09-26 08:52:18)
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
Pages: 1