Open henning410 opened 5 months ago
Okay, got it working by using
"authentication": {
"token": {
"token_refresh_cmd": "/usr/bin/python3 /home/user/Desktop/restler-tests/getNewToken.py",
"token_refresh_interval": 60
}
}
Also in my script, I added some print, so the script produces the following output:
{"id":{}}
Authorization: Bearer <My_Token>
At this point, PLEASE adjust the documentation. There are so many issues about authentication in this Repo, I only got the solution by searching through all issues.
Plus one to updating the docs. This tool is fantastic but is rough around the edges. I also had to search the issues and the web to figure out how auth and a bunch of other features work.
Description
I tried to use Authorization with JWT. Therefore, my settings.json file looks like:
In the documentation, there is not really specified how the file
getNewToken
should look like. Currently, this file calls my POST /login endpoint, which returns the valid JWT. Then, the script prints this out. The script itself is working. But I think, I should need to return the JWT in some other format?Steps to reproduce
All files are mentioned in my Description
Expected results
I expect everything to work and RESTler takes the correct Authorization header
Actual results
Environment details
No response