dvsekhvalnov / jose-jwt

Ultimate Javascript Object Signing and Encryption (JOSE), JSON Web Token (JWT) and Json Web Keys (JWK) Implementation for .NET and .NET Core
MIT License
934 stars 184 forks source link

extraHeaders not adding to headers in jwt token #184

Open michaelakin opened 2 years ago

michaelakin commented 2 years ago

I added an extraHeader and it did not appear when i put the token into jwt.io. Also, if you try to override the "alg" header it is supposed to throw an exception and it does not.

michaelakin commented 2 years ago

Nevermind, I removed the JWT package and now it works, but it still does not throw that exception if you add the alg to the extra headers.

dvsekhvalnov commented 2 years ago

'alg' / 'enc' in extra headers documented here: https://github.com/dvsekhvalnov/jose-jwt#adding-extra-headers

Can you post your code that doesn't include additional headers?

michaelakin commented 2 years ago

I tried in a fresh app and could not re-create. In the original app, I removed the other JWT nuget package the headers started showing up.

dvsekhvalnov commented 2 years ago

Glad it working, feel free to close then :)