JWT with non-XData Servers


Are there any demos/instructions on how to use TMS Web Core to work with JWT authentication with non XData servers please?

I have a REST server already (Delphi + MARS Framework) and that is working well - tested with VCL client and PostMan software.

I am very new to web client development so don't really know where to start with TMS Web ?


At this moment we haven't created a demo or example for this as outside TMS XData there are many different REST backends. There is a sample for TMS XData and given that use of JWT is a standard, I would assume that applying the same method as used with TMS XData for another backend should work.

Hi - thanks for your reply.

I looked at the Music sample for XData, but it uses a specialist "TXDataWebClient" which just calls "Invoke" with the service interface name and the username and password as an array parameter with a couple of callbacks.  I don't have that component, so it's of no help really.

I've set something up with a TWebRESTClient & it's nearly there - I just can't figure out what to put in the PostData parameter of the HttpsPost call?

The server is expecting form data with username and password fields.

I've tried a json string :  {"username":"admin","password":"letmein"} - but the server did not accept this.

Having used PostMan client to test the login and intercepting the traffic, I can see that the PostData should be multipart form data - i.e. with all that "boundary"  stuff going on.

But I need to put that in a string for the parameter of the HttpsPost method.

Does anyone have any ideas on how to produce a string that represents mulitpart form data ? 


multipart form data is just a way the text is formatted that is sent with a HTTPS POST.

So, you can the PostData string in a similar way as the text you see in PostMan.
Background info on multipart form data formatting can be found here:

Thanks for the info & link Bruno.

It might a nice feature to add a "GetPostData" method to Web Core's Login form? 


That is indeed a good suggestion to make it easier. We've taken note and will discuss.