
A custom Contact Form 7 integration may call a protected API with a signed JSON Web Token. Reading the token’s fields is only the first step. The receiver needs to verify the signature, validate the expected claims and decide whether that caller may perform the requested operation. jose, PyJWT, JJWT, lcobucci/jwt and Microsoft.IdentityModel.JsonWebTokens provide different runtime-specific tools for that boundary.
This documentation-based comparison was checked November 18, 2026. It covers a custom backend integration, not a native JWT feature of Contact Form 7 or CF7 Analytics. It does not rank cryptographic performance or replace the receiving API’s documented authentication profile.
Confirm that JWT is the actual contract
A bearer credential may be an opaque token rather than a JWT. A webhook signature over a request body is also a different mechanism. Start with the provider’s authentication specification; do not introduce JWT simply because a value contains dots or because a library can decode it.
For JWT-based contracts, define trusted issuers, expected audience, allowed algorithms, trusted keys, required time claims and limited clock tolerance. The JWT Best Current Practices explains why validation rules and algorithm choices must be deliberate. Keep server credentials out of public form markup and browser-side event handlers.
| Library | Runtime fit | Key validation concern | Core license and cost |
|---|---|---|---|
| jose | JavaScript Web Crypto runtimes | jwtVerify plus explicit expected claims | MIT, no core license fee |
| PyJWT | Python services and workers | Allowed algorithms and required claims | MIT, no core license fee |
| JJWT | Java applications | Typed signed parsing and trusted key selection | Apache-2.0, no core license fee |
| lcobucci/jwt | PHP services | Explicit signature and claim constraints | BSD-3-Clause, no core license fee |
| Microsoft.IdentityModel.JsonWebTokens | .NET applications | Validation parameters and IsValid result | MIT, no core license fee |
These are library licenses, not hosted identity-service prices. Key management, token issuance, infrastructure and engineering have separate costs. Check dependency notices and the supported runtime for the exact package you deploy. None of the five products becomes an identity provider merely by being installed.
jose
jose supports JWT and related JOSE operations in JavaScript environments with the required Web Crypto capabilities. For a Node.js or compatible runtime receiver, jwtVerify provides a verification path rather than just exposing the decoded claims.
Strength: the verification options make expected issuer, audience, allowed algorithms and required claims explicit. That suits a connector whose accepted token profile can be represented as reviewed configuration alongside the trusted key source.
Limitation: runtime support and supported algorithms still matter. A decode-only helper is not authentication, and loading a key from a remote source requires a trusted configuration decision. Do not allow an untrusted token to choose an arbitrary network destination for key retrieval.
Choose jose when JavaScript runtime compatibility and its verification API fit the existing receiver. Define expiration requirements explicitly instead of assuming every optional claim is mandatory. The core license is MIT. Keep authorization checks after successful verification.
PyJWT
PyJWT’s decode API accepts a key, allowed algorithms and expected issuer or audience. Its options distinguish checking a claim’s value from requiring that the claim be present. This distinction matters when the integration contract demands exp, nbf or iat.
Strength: it fits Python workers and receiver services without introducing another application runtime. The usage guide covers claim checks, time handling and key-related workflows, allowing a team to keep token policy close to an existing Python integration.
Limitation: the accepted algorithm policy must come from trusted configuration, not the token’s unverified header. Some cryptographic algorithms require additional dependencies. A successful parse with verification disabled cannot be promoted into an authenticated request.
Choose PyJWT for a Python backend with a clear token profile. Test absent required claims as well as incorrect values, and distinguish invalid credentials from a temporary trusted-key retrieval failure. The project is MIT licensed; hosting and identity-provider subscriptions are separate.
JJWT
JJWT provides Java JWT parsing and verification APIs, including a parser builder, fixed verification keys and key-location strategies. Typed methods such as parseSignedClaims help express that the application expects signed claims rather than accepting any token shape.
Strength: the Java API can fit a receiver’s established key and exception-handling conventions. For a single trusted signing key, verifyWith makes the verification input explicit. For a reviewed rotation strategy, a key locator can select from the trusted key set.
Limitation: selecting a key is not the same as trusting its origin. Keep key-location rules bounded to the expected issuer, and treat unsupported algorithms, wrong keys and invalid claims as rejected authentication. Package modules and cryptographic provider requirements also need review for the target Java runtime.
Choose JJWT when the integration already runs in Java and the team can keep parsing, claim requirements and authorization separate. Retain a repeatable negative fixture suite when upgrading. JJWT uses the Apache-2.0 license, with no core subscription price.
lcobucci/jwt
lcobucci/jwt documents constraint-based validation for PHP. Parsing a token produces something to inspect, while constraints such as SignedWith, IssuedBy and PermittedFor express separate signature, issuer and audience checks.
Strength: named constraints make a PHP receiver’s policy reviewable. A reviewer can see whether the application checks the signature and audience rather than assuming that a generic “valid token” helper covers every required condition. That suits a narrowly scoped service maintained by a PHP team.
Limitation: a parser and one claim constraint are not a complete authentication policy. StrictValidAt requires and validates iat, nbf and exp, while LooseValidAt checks those time claims when present. Select the time policy to match the actual issuer contract, not a convenient example.
Choose lcobucci/jwt when explicit PHP constraints fit your backend. Keep signing keys in private server configuration and avoid turning a browser-supplied claim into a privileged WordPress action. The core uses BSD-3-Clause licensing. No native CF7 connector is implied.
Microsoft.IdentityModel.JsonWebTokens
JsonWebTokenHandler.ValidateTokenAsync validates tokens against TokenValidationParameters. Its documented result handling is significant: callers must inspect TokenValidationResult.IsValid. A returned result object is not by itself proof of successful validation.
Strength: it fits .NET applications already using IdentityModel components and structured authentication configuration. The team can define expected issuer, audience, lifetime and keys in the same service boundary that owns the protected API.
Limitation: reading a JsonWebToken and validating it are different operations. Ensure rejected results cannot reach the business handler, and review framework middleware before adding a parallel manual validation path. Multiple inconsistent policies make authentication harder to reason about.
Choose this library for an established .NET receiver, using the supported package line appropriate to its runtime. The IdentityModel repository publishes support information and MIT licensing. Identity-platform subscriptions and application hosting remain separate from the library core.
Compare rejection behavior before rollout
Use synthetic tokens issued by a private fixture key. Check a valid token, wrong signature, wrong issuer, wrong audience, expired token and missing required time claim. Add a token using an algorithm outside your configured policy. Confirm every rejected credential stops before storage or CRM updates.
Then test authorization separately: an authenticated caller should still be unable to update another tenant’s inquiry. A valid JWT also does not bind arbitrary request-body bytes to a token unless the agreed protocol specifically does so. Follow the provider’s body-signature requirements where those apply.
Choose primarily by runtime and the policy your team can review: jose for compatible JavaScript, PyJWT for Python, JJWT for Java, lcobucci/jwt for PHP and IdentityModel for .NET. Keep failure logs free of complete bearer tokens. Review the connector secrets workflow alongside token validation.
CF7 Analytics is our product. Our free Svetlik Analytics for Contact Form 7 covers submission trends inside WordPress. A custom protected connector needs its own authentication, authorization and delivery receipt checks; successful token verification alone does not prove the inquiry reached its destination.
