Git Product home page Git Product logo

Comments (10)

robotdan avatar robotdan commented on May 26, 2024

Thanks for the report. Yes, feel free to submit a PR or I can take a look shortly.

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

Looking at this further, I have some tests that utilize this code path, can you provide some recreate steps to see this error?

from fusionauth-jwt.

XakepSDK avatar XakepSDK commented on May 26, 2024

This means tests are not running with enabled module system. I get this error when module system is enabled, otherwise there is no error.

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

Thanks @XakepSDK - happy to look into this and fix it. Can you please some specific recreate steps?

from fusionauth-jwt.

XakepSDK avatar XakepSDK commented on May 26, 2024

I made a simple reproducer, https://github.com/XakepSDK/fusionauth-testcase
How to use it:

  1. Clone
  2. Go to app dir
  3. Run run.sh, minimum java 9 required, if you are on windows, just run 2nd line from run.sh in cmd
  4. Get an error

Harder path:

  1. Install Intellij IDEA 2021.1.x. 2021.2.x has broken module handling. I have no idea about other IDEs
  2. Open project
  3. Launch Test class

Caveats:

  1. If you use gradle, then IDEA will use gradle to launch an app, looks like gradle 7 does not handle module launching at all and starts apps with classpath
  2. IDEA 2021.2 has broken module handling, it might work for this simple project, but in other project it didn't work

How to fix:

  1. Get rid of JSONWebKeySetResponse
  2. Or add opens io.fusionauth.jwks to com.fasterxml.jackson.databind
  3. Or make JSONWebKeySetResponse public with public constructor

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

Thanks @XakepSDK - this is great, I'll take a look.

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

For simplicity, I just changed JSONWebKeySetResponse to be public.

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

Fix is available in version 4.3.1. I tested version 4.3.1 in your test project to confirm.

Thanks for the assist @XakepSDK !

from fusionauth-jwt.

XakepSDK avatar XakepSDK commented on May 26, 2024

You can also fix this by adding opens <package> to <jackson.databind.module> in a module descriptor

from fusionauth-jwt.

robotdan avatar robotdan commented on May 26, 2024

You can also fix this by adding opens to <jackson.databind.module> in a module descriptor

Yes, I did try that, and it does work.

However the class really doesn't need to be private, so that seemed like the more correct fix from my perspective.

I suppose I could also just use a TypeLiteral with Jackson indicate how I want to de-serialize the response, then I could just delete the class. Perhaps I'll revisit how I am marshaling this object at some point.

If you run into any other issues with the library, please do open another GH issue. Thanks for the help!

from fusionauth-jwt.

Related Issues (20)

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.