JWT interop

Results from 2026-11-28 07:52 UTC

23 libraries in 8 languages · workflow run · commit 233023a · raw data

Every library signs tokens with each algorithm it supports, verifies a sample of the tokens from all the others, and tries tokens that are written in other encodings or bend other rules. Every hand-built token carries a valid signature over its parts exactly as written.

Green behaves as the RFCs require. Amber is more lenient or stricter than the RFCs. Red is an error. Grey is not supported. Hover over a cell to see the error a library gave.

Changes

This is the first recorded run.

Tokens created by each library

Each library signed the same payloads with each algorithm it supports. A tick means every token was base64url without padding and its header named the algorithm that was asked for. 1843 of 1848 tokens contain - or _, so a library using the standard alphabet would have shown up.

LibraryHS256RS256PS256ES256ES384ES512EdDSAEd25519
dotnet/Microsoft.IdentityModel.JsonWebTokens8.23.0✓✓✓✓✓✓––
dotnet/System.IdentityModel.Tokens.Jwt8.23.0✓✓✓✓✓✓––
dotnet/jose-jwt5.3.0✓✓✓✓✓✓––
go/golang-jwtv5.3.1✓✓✓✓✓✓✓–
go/go-josev4.1.9✓✓✓✓✓✓✓–
go/jwxv3.5.0✓✓✓✓✓✓✓✓
java/jjwt0.12.6✓✓✓✓✓✓✓–
java/nimbus-jose-jwt10.3✓✓✓✓✓✓✓✓
java/java-jwt4.5.0✓✓–✓✓✓––
node/jsonwebtoken9.0.3✓✓✓✓✓✓––
node/jose6.2.18✓✓✓✓✓✓✓✓
node/fast-jwt6.3.7✓✓✓✓✓✓✓–
php/firebase/php-jwtv7.2.2✓✓–✓✓–✓–
php/lcobucci/jwt5.7.0✓✓–✓✓✓✓–
php/web-token/jwt-library4.2.8✓✓✓✓✓✓✓–
python/PyJWT2.15.1✓✓✓✓✓✓✓–
python/jwcrypto1.6.2✓✓✓✓✓✓✓✓
python/joserfc1.8.0✓✓✓✓✓✓✓✓
python/python-jose3.5.0✓✓–✓✓✓––
ruby/jwt3.3.2 (jwt-eddsa 1.1.0)✓✓✓✓✓✓✓header says EdDSA
ruby/json-jwt1.17.2✓✓✓✓✓✓––
rust/jsonwebtoken12.0.0✓✓✓✓✓–✓–
rust/josekit0.11.0✓✓✓✓✓✓✓–

Verifying a normal token

Each library tried to verify a correctly written token for each algorithm.

LibraryHS256RS256PS256ES256ES384ES512EdDSAEd25519
dotnet/Microsoft.IdentityModel.JsonWebTokens8.23.0✓✓✓✓✓✓––
dotnet/System.IdentityModel.Tokens.Jwt8.23.0✓✓✓✓✓✓––
dotnet/jose-jwt5.3.0✓✓✓✓✓✓––
go/golang-jwtv5.3.1✓✓✓✓✓✓✓–
go/go-josev4.1.9✓✓✓✓✓✓✓–
go/jwxv3.5.0✓✓✓✓✓✓✓✓
java/jjwt0.12.6✓✓✓✓✓✓✓–
java/nimbus-jose-jwt10.3✓✓✓✓✓✓✓✓
java/java-jwt4.5.0✓✓–✓✓✓––
node/jsonwebtoken9.0.3✓✓✓✓✓✓––
node/jose6.2.18✓✓✓✓✓✓✓✓
node/fast-jwt6.3.7✓✓✓✓✓✓✓–
php/firebase/php-jwtv7.2.2✓✓–✓✓–✓–
php/lcobucci/jwt5.7.0✓✓–✓✓✓✓–
php/web-token/jwt-library4.2.8✓✓✓✓✓✓✓–
python/PyJWT2.15.1✓✓✓✓✓✓✓–
python/jwcrypto1.6.2✓✓✓✓✓✓✓✓
python/joserfc1.8.0✓✓✓✓✓✓✓✓
python/python-jose3.5.0✓✓–✓✓✓––
ruby/jwt3.3.2 (jwt-eddsa 1.1.0)✓✓✓✓✓✓✓✓
ruby/json-jwt1.17.2✓✓✓✓✓✓––
rust/jsonwebtoken12.0.0✓✓✓✓✓–✓–
rust/josekit0.11.0✓✓✓✓✓✓✓–

Tokens with other encodings

Each library tried to verify an HS256, RS256 and ES256 token written in another encoding.

Padded signature
the normal token with = padding added to the signature.
+ / in signature
the normal token with - and _ in the signature replaced by + and /.
Padding everywhere
base64url with padding in all three parts, signed over the padded parts. AWS Application Load Balancer issues tokens like this, and it is what Base64.urlsafe_encode64 in Ruby and base64.urlsafe_b64encode in Python produce by default.
Standard Base64 everywhere
standard Base64 with padding in all three parts, signed over those parts.
LibraryPadded signature+ / in signaturePadding everywhereStandard Base64 everywhere
dotnet/Microsoft.IdentityModel.JsonWebTokens8.23.0acceptsrejectsacceptsrejects
dotnet/System.IdentityModel.Tokens.Jwt8.23.0rejectsrejectsrejectsrejects
dotnet/jose-jwt5.3.0acceptsacceptsrejectsrejects
go/golang-jwtv5.3.1rejectsrejectsrejectsrejects
go/go-josev4.1.9rejectsrejectsrejectsrejects
go/jwxv3.5.0acceptsacceptsrejectsrejects
java/jjwt0.12.6acceptsrejectsacceptsrejects
java/nimbus-jose-jwt10.3acceptsacceptsacceptsaccepts
java/java-jwt4.5.0acceptsrejectsacceptsrejects
node/jsonwebtoken9.0.3rejectsrejectsrejectsrejects
node/jose6.2.18acceptsrejectsacceptsrejects
node/fast-jwt6.3.7rejectsrejectsrejectsrejects
php/firebase/php-jwtv7.2.2acceptsacceptsacceptsaccepts
php/lcobucci/jwt5.7.0rejectsrejectsrejectsrejects
php/web-token/jwt-library4.2.8rejectsrejectsrejectsrejects
python/PyJWT2.15.1acceptsrejectsacceptsrejects
python/jwcrypto1.6.2rejectsrejectsrejectsrejects
python/joserfc1.8.0rejectsrejectsrejectsrejects
python/python-jose3.5.0acceptsacceptsacceptsaccepts
ruby/jwt3.3.2 (jwt-eddsa 1.1.0)acceptsacceptsacceptsaccepts
ruby/json-jwt1.17.2acceptsacceptsacceptsaccepts
rust/jsonwebtoken12.0.0rejectsrejectsrejectsrejects
rust/josekit0.11.0rejectsrejectsrejectsrejects

Other edge cases

Each library tried to verify tokens that bend other rules.

Unknown crit
an HS256 token whose crit header lists an extension nobody understands. RFC 7515 says it must be rejected.
alg in other case
hs256 instead of HS256, and ED25519 instead of Ed25519. Algorithm names are case-sensitive.
ECDSA high S
an ES256 signature using the larger of the two valid s values, which is the same signature written differently.
ECDSA DER signature
an ES256 signature in DER encoding instead of the fixed-length r and s that RFC 7518 requires.
PS256 without salt
a PS256 signature with an empty salt. RFC 7518 requires a salt as long as the hash.
PS256 longest salt
a PS256 signature with the longest possible salt.
LibraryUnknown critalg in other caseECDSA high SECDSA DER signaturePS256 without saltPS256 longest salt
dotnet/Microsoft.IdentityModel.JsonWebTokens8.23.0acceptsrejectsacceptsrejectsrejectsrejects
dotnet/System.IdentityModel.Tokens.Jwt8.23.0acceptsrejectsacceptsrejectsrejectsrejects
dotnet/jose-jwt5.3.0acceptsrejectsacceptsrejectsrejectsrejects
go/golang-jwtv5.3.1acceptsrejectsacceptsrejectsacceptsaccepts
go/go-josev4.1.9rejectsrejectsacceptsrejectsacceptsaccepts
go/jwxv3.5.0acceptsrejectsacceptsrejectsrejectsrejects
java/jjwt0.12.6rejectsrejectsacceptsrejectsrejectsrejects
java/nimbus-jose-jwt10.3rejectsrejectsacceptsrejectsrejectsrejects
java/java-jwt4.5.0acceptsrejectsacceptsrejects––
node/jsonwebtoken9.0.3acceptsrejectsacceptsrejectsrejectsrejects
node/jose6.2.18rejectsrejectsacceptsrejectsrejectsrejects
node/fast-jwt6.3.7rejectsrejectsacceptsrejectsrejectsrejects
php/firebase/php-jwtv7.2.2acceptsrejectsacceptsrejects––
php/lcobucci/jwt5.7.0acceptsrejectsacceptsrejects––
php/web-token/jwt-library4.2.8acceptsrejectsacceptsrejectsrejectsrejects
python/PyJWT2.15.1rejectsrejectsacceptsrejectsrejectsrejects
python/jwcrypto1.6.2rejectsrejectsacceptsrejectsrejectsrejects
python/joserfc1.8.0rejectsrejectsacceptsrejectsrejectsrejects
python/python-jose3.5.0acceptsrejectsacceptsrejects––
ruby/jwt3.3.2 (jwt-eddsa 1.1.0)acceptsacceptsacceptsrejectsacceptsaccepts
ruby/json-jwt1.17.2acceptsrejectsacceptsrejectsrejectsrejects
rust/jsonwebtoken12.0.0rejectsrejectsacceptsrejectsrejectsrejects
rust/josekit0.11.0rejectsrejectsacceptsrejectsrejectsrejects

Tokens from other libraries

Each library tried to verify a sample of the tokens created by all the libraries above, for the algorithms it supports.

LibraryVerifiedFailed for
dotnet/Microsoft.IdentityModel.JsonWebTokens8.23.0396 of 396–
dotnet/System.IdentityModel.Tokens.Jwt8.23.0396 of 396–
dotnet/jose-jwt5.3.0396 of 396–
go/golang-jwtv5.3.1444 of 444–
go/go-josev4.1.9444 of 444–
go/jwxv3.5.0462 of 462–
java/jjwt0.12.6444 of 444–
java/nimbus-jose-jwt10.3459 of 462ruby/jwt Ed25519
java/java-jwt4.5.0339 of 339–
node/jsonwebtoken9.0.3396 of 396–
node/jose6.2.18459 of 462ruby/jwt Ed25519
node/fast-jwt6.3.7444 of 444–
php/firebase/php-jwtv7.2.2324 of 324–
php/lcobucci/jwt5.7.0387 of 387–
php/web-token/jwt-library4.2.8444 of 444–
python/PyJWT2.15.1444 of 444–
python/jwcrypto1.6.2459 of 462ruby/jwt Ed25519
python/joserfc1.8.0459 of 462ruby/jwt Ed25519
python/python-jose3.5.0339 of 339–
ruby/jwt3.3.2 (jwt-eddsa 1.1.0)459 of 462ruby/jwt Ed25519
ruby/json-jwt1.17.2396 of 396–
rust/jsonwebtoken12.0.0381 of 381–
rust/josekit0.11.0444 of 444–

Keys published by identity providers

The JWKS each provider publishes, found through its OpenID Connect discovery document. Amber marks RSA keys shorter than 2048 bits and keys without alg, which leave the algorithm to the token or the library. x5c holds a certificate chain, and x5t and x5t#S256 are certificate thumbprints. Other members are not defined in RFC 7517 or RFC 7518. Encoding checks that base64url values have no padding and use the URL-safe alphabet.

ProviderKeysKey typesalguseCertificatesOther membersEncoding
Apple3RSA 2048 ×3RS256 ×3sig ×3––✓
Atlassian6RSA 2048 ×6RS256 ×6sig ×6x5c ×6, x5t ×6–✓
Connect2id demo10RSA 2048 ×2, EC P-256 ×2, EC P-384 ×2, EC P-521 ×2, EC secp256k1, OKP Ed25519not set ×10sig ×6, enc ×4––✓
Facebook2RSA 2048 ×2RS256 ×2sig ×2––✓
GitHub Actions4RSA 2048 ×4RS256 ×4sig ×4x5c ×3, x5t ×3–✓
GitLab3RSA 4096, RSA 2048 ×2RS256 ×3sig ×3––✓
Google2RSA 2048 ×2RS256 ×2sig ×2––✓
JumpCloud6RSA 4096 ×6RS256 ×6sig ×6––✓
Kakao2RSA 2048 ×2RS256 ×2sig ×2––✓
LINE20EC P-256 ×20ES256 ×20sig ×20–xvalue, yvalue✓
LinkedIn1RSA 4096not setnot set––✓
Microsoft Entra ID8RSA 2048 ×8not set ×8sig ×8x5c ×8, x5t ×8cloud_instance_name, issuer✓
Microsoft account3RSA 2048 ×3not set ×3sig ×3x5c ×3, x5t ×3–✓
Salesforce3RSA 4096 ×3RS256 ×3sig ×3––✓
Sigstore2RSA 2048 ×2RS256 ×2sig ×2––✓
Slack1RSA 2048RS256not set––✓
Twitch1RSA 2048RS256sig––✓
Yahoo6RSA 1024 ×4, EC P-256 ×2RS256 ×4, ES256 ×2sig ×6––✓
Zoho2RSA 2048 ×2RS256 ×2enc, sig––✓