go-jose
go-jose copied to clipboard
The example for making encrypted JWTs doesn't work
Execute the code example found here: https://pkg.go.dev/gopkg.in/square/go-jose.v2/jwt#example-Encrypted
The resulting JWT token is invalid, it has no contents
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4R0NNIiwidHlwIjoiSldUIn0..JY8-0PpFpvdrKEf8.f_7kAbKUHASjdv4Tuz14b2fUDPRm8uPIiRGmcNY27WA.YxpmkzkaVwzrU1-gjkAKYA
I tried replicating the problem, however it worked for me both ways. I can create a JWE (using the referenced example) and then later decode claims from it (using this example).
@asilverman, could you please provide steps to replicate the issue?
@pippo notice how the example you are referencing is using a JWT with no contents (a substring ..
) means no claims payload