delphi - How to get a token passed as header using datasnap? -
in client application i'm using following code add token in header:
restrequest.params.additem('authorization', 'bearer ' + mytoken, trestrequestparameterkind.pkhttpheader, [trestrequestparameteroption.podonotencode]);
i'd token in server using datasnap.
i've tried use answer here , here without success.
is possible?
how can this?
edit
i verify datasnap
executes tidcustomhttpserver.doparseauthentication
and doparseauthentication
calls fonparseauthentication
if assigned.
so, how can hack datasnap assign own onparseauthentication
?
i think solve problem.
i have same problem. if authentication header used eidhttpunsupportedauthorisationscheme error, need setup onparseauthentication. started looking today , in test app "desktop" can following.
procedure tmainform.formcreate(sender: tobject); begin fserver := tidhttpwebbrokerbridge.create(self); fserver.onparseauthentication := doparseauthentication;// <-added line end;
now need figure out how update asapi dll same.
Comments
Post a Comment