jwtauth icon indicating copy to clipboard operation
jwtauth copied to clipboard

Upgrade to lestrrat-go/jwx/v3

Open kw510 opened this issue 7 months ago • 8 comments

  • Update dependencies to use v3 of lestrrat-go/jwx and related packages

  • Refactor JWT handling in tests and main code for compatibility with new API.

kw510 avatar May 16 '25 22:05 kw510

Yes please, this brings issues!

plutov avatar Jun 01 '25 17:06 plutov

@kw510 did you manage to make tests work? I did similar PR, but jwt.Sign complains. https://github.com/go-chi/jwtauth/pull/102

plutov avatar Jun 02 '25 20:06 plutov

@plutov Heya! Just had a look and you had the same issue I had, but i did get the tests working in the end 🙈

I fixed it by this replacement :)

- // NewSignatureAlgorithm creates a new SignatureAlgorithm object with the given name.
- jwa.NewSignatureAlgorithm
+ // LookupSignatureAlgorithm returns the SignatureAlgorithm object for the given name.
+ jwa.LookupSignatureAlgorithm

kw510 avatar Jun 02 '25 20:06 kw510

@kw510 please also change the version in the example file.

plutov avatar Jun 03 '25 14:06 plutov

@VojtechVitek @kw510 let's merge it ? ;)

plutov avatar Jul 09 '25 08:07 plutov

Hey @VojtechVitek I tested it on a project where it was originally failing, but now it works well. Looks good from my side!

plutov avatar Jul 21 '25 09:07 plutov

@VojtechVitek how is testing going? Why this merge takes so long?

plutov avatar Aug 12 '25 08:08 plutov

Same question as @plutov: I've been holding off updating some libraries because of this PR. What's the status?

hacdias avatar Oct 22 '25 07:10 hacdias