Closed poikilotherm closed 5 years ago
Hello,
I've been facing the same problem.
To fix this (temporarily), I've change line 209 in glpi.py :
if self.token_auth is not None:
auth = self.token_auth
by
if self.token_auth is not None:
headers["Authorization"] = "user_token "+self.token_auth
Hi @mtulio,
I just tried to use your module with a User Token (generate in profile) and noticed that this is not supported.
Seems to be related to https://github.com/truly-systems/glpi-sdk-python/blob/e0bb986bb58dfffd2c83c25e882931f919a274f6/glpi/glpi.py#L213 using the static
auth
parameter.As far as I understand the REST API docs, one needs to send an
Authorization: user_token xxx
header. Theauth
param ofrequest()
seems to default to basic auth.Could you have a look at this?
Thanks! Poikilotherm