You are not logged in.
It took me some time to debug it and find why I got denials when using a TRestHttpClientWinHttp to authenticate using JWTs
In the following code gives back error that JWT is not provided :
cl:=TRestHttpClientWinHttp.Create(SrvIP,inttostr(SrvPort),TOrmModel.Create([],urlbase),SrvSsl,'','',netsendTimeout,netretTimeout,netsendTimeout);
cl.Model.Owner:=cl;
if cl.ServerTimestampSynchronize then
begin
cl.CustomHeader:=AuthorizationBearer(TheJWThere);
if cl.ServiceDefine([iservice],sicShared) then cl.Resolve(iservice,serv);
end;
Instead of the following
cl.CustomHeader:=AuthorizationBearer(TheJWThere);
use the following:
cl.SessionHttpHeader:=AuthorizationBearer(TheJWThere);
it seems that cl.CustomHeader is not sent to the server
Offline