View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] How to access classes from foreign script - ProjeQtOr
 

[SOLVED] How to access classes from foreign script

More
17 Mar 2021 17:05 #1 by Baryhobal
Hello,
Working on creating tickets via a telegram bot, I need to fetch some data from the database so I use the API. This is all good but it's a bit slow since it has to make several requests. I was thinking about making the script act as a real user and directly connect to projeqtor so it can have access to all the classes and functions. However, even after looking around some files, I'm still not sure how the login is handled.
Is it possible to simulate real user login via a script (located in tool directory) and if yes, how ?

Please Log in or Create an account to join the conversation.

More
17 Mar 2021 17:51 #2 by Baryhobal
A bit more precision,
The script is in tool/ but is called via a POST request from nodered so it doesn't have direct access to the classes and functions

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 11:00 #3 by babynus
So you will have access as client, and cannot simulaite connected user on server side...
ProjeQtOr uses PHP Session (using cookies) to identify connexion.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 12:34 #4 by Baryhobal
but wouldn't it be possible to create a new session as if it was my first visit on the page ? And I could save the PHP_SESSID to reuse the same session

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 14:27 #5 by babynus
We do not manage this.
PHP does.
I'm not sure, for security reason, you can find a workaroud

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 21:16 #6 by Baryhobal
Nevermind, I got it working by copying what the API does. Thx for replying

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.035 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.