-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with the latest version of jjwt #1724
Comments
Because in the |
0.12.0 is barely a week old. I would suggest you file a bug and/or PRs in the https://github.com/jwtk/jjwt project to return these methods. I understand why they removed them, but I don't see why these particular methods had to be removed before 1.0 release. As to how to address this, we could keep the old dependency in this project and add code that tries to call the new method and catches the |
I had a bit of time, so I quickly contributed a change: #1727 |
Thanks for providing a fix but I'm not sure it will be accepted since it's not backward compatible, see what Liam suggested:
@bitwiseman there is still something unclear to me though, granted the method is not in the Furthermore, a direct call to I'm pretty sure there is some subtlety here I'm not grasping, but I just cannot put my finger on it :/ |
@PierreBtz, yes I already mentioned the incompatibility in my pull request text. I do not think this is a compatibility issue as a change to github-api's API would be. This would rather require dependents to update not only the github-api but also the version of the jjwt suite. |
There are clients of this library that cannot always be depended on to be using the most recent version (Jenkins). |
@bitwiseman I took a bit of time to update my pull request. It would now use reflective access to stay compatible with older versions. Please consider this as a draft suggestion, not tested yet. If we agree on this to be a way forward, I can still add tests. |
@ihrigb When you're done we also need to do a test to make sure it works. This might be something that we test once manually and make very clear that it should not be changed and how to test it if it must be changed. |
Describe the bug
When using the latest version of jjwt (0.12.x) to handle authentication with a JWT token, I observe the following issue:
To Reproduce
I created the following reproducer: https://github.com/PierreBtz/jwt-github-bug.
A unit test shows the issue, using an older version of jjwt the test is GREEN, using the latest 0.12.(x), the test is RED (see README for setup details).
Expected behavior
Jwt works properly.
Desktop (please complete the following information):
Additional context
The root cause seems to be jwtk/jjwt#794 which deprecated a bunch of setters.
An evident fix would be to modify the code to use the new setters instead of the old deprecated one, and I'm happy to provide a PR for this however:
The text was updated successfully, but these errors were encountered: