Implement rsql JWT lazarus / 16-Databases ---------------------------------------------------------------------- cappe · 2021-04-02 10:04 Can anyone tell me how to implement JWT security in RSQL, of which I am attaching the link of the project? https://github.com/groupsc10/RSQL/ ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-04-02 14:56 Hey Cappe, That project already has a RSQL_Crypto_JWT.pas source file. Can you provide more info of what you want? It's not apparent from the very small amount of info you've given us, what you're asking for. Cheers, Gus ---------------------------------------------------------------------- cappe · 2021-04-03 06:02 Thank you for answering. The problem is how I pass the JWT object to TRSQLClient. I couldn't figure out how. Could you give me an example and also how to read it on TRSQLServer. Thanks ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-04-03 06:13 Hey Cappe, Quote from: cappe on April 03, 2021, 08:02:56 amThank you for answering. You are more than welcome!! Quote from: cappe on April 03, 2021, 08:02:56 amThe problem is how I pass the JWT object to TRSQLClient. I couldn't figure out how. Could you give me an example and also how to read it on TRSQLServer. Have you had a look under the folder demo? Under that folder there are 3 other folders. basic: Contains examples of a server and a clientdb: Contains the sql script for the demosjwt: Contains an example using the RSQL_Crypto_JWT.pas That's where you'll find the examples you need. Apart from that I can't help you since I've never used this code. Cheers, Gus ---------------------------------------------------------------------- cappe · 2021-04-03 06:40 The problem is how do I pass the object created with the RSQL_Crypto_JWT.pas example into TRSQLClient? ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-04-03 06:48 Hey Cappe, Quote from: cappe on April 03, 2021, 08:40:54 amThe problem is how do I pass the object created with the RSQL_Crypto_JWT.pas example into TRSQLClient? Like I said, I've never used this code before. But doesn't TRSQLClient have a property, maybe Body, where you can put the signed payload that comes from the JWT Crypto? Try and find out... Cheers, Gus ---------------------------------------------------------------------- cappe · 2021-04-03 07:35 What you wrote doesn't help me ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-04-03 07:44 Hey Cappe, Quote from: cappe on April 03, 2021, 09:35:10 amWhat you wrote doesn't help me You're absolutely right, and I'm really sorry for that! But I cannot also do all the work for you, can I. If the author doesn't provide any documentation, you're only hope is the source, Luke... Or Obywan Kenobi... Depends whom you ask Cheers, Gus ---------------------------------------------------------------------- cappe · 2021-04-03 07:51 To tell the truth something I would have been able to do, but I changed the source, so it is no longer the original project. I wanted to know how the author intended, I can't understand it. ---------------------------------------------------------------------- jcmontherock · 2021-04-03 09:31 Try to contact Groupo SC10... ---------------------------------------------------------------------- cappe · 2021-04-03 09:50 Thanks for the answer, but where can I find the Groupo SC10? ---------------------------------------------------------------------- Leledumbo · 2021-04-03 12:43 Quote from: cappe on April 03, 2021, 09:51:13 amThanks for the answer, but where can I find the Groupo SC10? You're trying to use something from github, every github project belongs to a user. The bold part in https://github.com/groupsc10/RSQL/ is the user, you can contact directly in github through issues page. Quote from: cappe on April 03, 2021, 08:40:54 amThe problem is how do I pass the object created with the RSQL_Crypto_JWT.pas example into TRSQLClient? As for your inability to understand an undocumented, let alone it's an ALPHA quality project with high chance of API change (the author has warned you in the README.md), the answer is you don't. The JWT handling is part of the extended fphttpapp server in RSQL_Server_Application unit. You use that server, you get JWT protected routes to access the DBMS, details in RSQL_Server_Router unit. ---------------------------------------------------------------------- cappe · 2021-04-03 12:52 Ok. Another question, to enable SSL, I have selected useSSL in both the connector and the server, but it doesn't work. Do I have to do something else?