Giter VIP home page Giter VIP logo

Comments (9)

mooreds avatar mooreds commented on July 23, 2024 2

Please leave it open, so we can fix the issue. As @robotdan says, we should handle True correctly.

from fusionauth-python-client.

mooreds avatar mooreds commented on July 23, 2024

What happens if you try with

client_response = anonymous_client.logout(False, token)

do you still get an error?

from fusionauth-python-client.

tanwirahmad avatar tanwirahmad commented on July 23, 2024

Yes, I get the same error. The HTTP status code is always 400.

from fusionauth-python-client.

robotdan avatar robotdan commented on July 23, 2024

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.

from fusionauth-python-client.

tanwirahmad avatar tanwirahmad commented on July 23, 2024

As a work around, what if you try passing "true" instead of True and see if that helps.

This fixes the issue. Should I close it?

from fusionauth-python-client.

mooreds avatar mooreds commented on July 23, 2024

#11 documents the workaround.

from fusionauth-python-client.

mooreds avatar mooreds commented on July 23, 2024

Have a fix for this in the code: FusionAuth/fusionauth-client-builder#46

from fusionauth-python-client.

mooreds avatar mooreds commented on July 23, 2024

Added test for it here: #16

This test will fail until there's a new release, but I've checked it manually and FusionAuth/fusionauth-client-builder#46 will cause the test to pass.

from fusionauth-python-client.

mooreds avatar mooreds commented on July 23, 2024

The fix is merged and will be included in the next release of the client library.

from fusionauth-python-client.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.