Open tanwirahmad opened 3 years ago
What happens if you try with
client_response = anonymous_client.logout(False, token)
do you still get an error?
Yes, I get the same error. The HTTP status code is always 400.
My guess is that the True
is not serializing to the lower case true
when converted to a request parameter.
Here is where we build the request parameter: https://github.com/FusionAuth/fusionauth-client-builder/blob/d64a871ba9d8fcedc7922bddced491ec80b5bd02/src/main/client/python.client.ftl#L76
And here is where we manage conversions for Python: https://github.com/FusionAuth/fusionauth-client-builder/blob/d64a871ba9d8fcedc7922bddced491ec80b5bd02/src/main/client/_macros.ftl#L197
So we may have a bug in our builder since we should probably expect True
or False
.
https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values
As a work around, what if you try passing "true"
instead of True
and see if that helps.
As a work around, what if you try passing
"true"
instead ofTrue
and see if that helps.
This fixes the issue. Should I close it?
Please leave it open, so we can fix the issue. As @robotdan says, we should handle True
correctly.
https://github.com/FusionAuth/fusionauth-python-client/pull/11 documents the workaround.
Have a fix for this in the code: https://github.com/FusionAuth/fusionauth-client-builder/pull/46
Added test for it here: https://github.com/FusionAuth/fusionauth-python-client/pull/16
This test will fail until there's a new release, but I've checked it manually and https://github.com/FusionAuth/fusionauth-client-builder/pull/46 will cause the test to pass.
The fix is merged and will be included in the next release of the client library.
Hi, I am using the python client to logout a user. Unfortunately, I am getting the following response from the server.
Here is my code:
Versions Fusionauth-client 1.19.8 FusionAuth 1.19.8