web-token/jwt-signature-algorithm-hmac
HMAC signature algorithm support for the web-token/jwt framework. Provides HS256, HS384, and HS512 signing and verification using shared secrets, integrating with JWT creation and validation in PHP.
hash_hmac plus base64url encoding and constant-time comparison, or pulling in a monolith like firebase/php-jwt or tymon/jwt-auth. This is a "buy" in the sense that you adopt a spec-compliant, separately versioned algorithm implementation instead of owning crypto correctness. At 14 stars and 0 listed dependents, evaluate it as a component of the JWT Framework, not as a standalone dependency — the framework's reputation and release cadence are the real signal.web-token/jwt-framework (or the relevant core packages). The PM decision is really "standardize on web-token/jwt-framework for JWT in our PHP services," and this package is one leaf of that decision.Adopt when:
web-token/jwt-framework and need HS256/384/512 — this is the canonical, spec-correct implementation for that framework.alg: none rejection, base64url correctness) and don't want to defend a hand-rolled implementation in a security review.Look elsewhere when:
tymon/jwt-auth or firebase/php-jwt already bundle HMAC and have far larger install bases and community support.For executives: We need signed tokens to authenticate service-to-service calls and API requests. Rather than write our own signing code — a classic source of security incidents — we can adopt a small, MIT-licensed, standards-compliant component from an established PHP JWT framework. It costs nothing, adds no vendor relationship, and reduces the chance of a token-forgery or timing-attack bug reaching production. The trade-off is that it is a narrow component, not a platform: it signs tokens, it does not manage keys or revocation, so we still own operational key handling. It is also symmetric-only, meaning it fits internal traffic today but will not support external partners or social login without a follow-on asymmetric algorithm package — a known, plannable piece of work.
For engineering: This is the HMAC algorithm plugin for web-token/jwt-framework. It gives us HS256/384/512 with correct base64url handling and constant-time verification, instead of us maintaining that logic. Adoption assumes the framework's core packages come with it, so the real review is "do we standardize on web-token/jwt-framework?" The repo itself is low-traffic (14 stars, no listed dependents), so treat the framework's release cadence as the maintenance signal and add it to dependency scanning. Secret distribution and rotation remain our problem — plan for a secrets manager and a key-id (kid) strategy from day one, so the eventual move to RS256/ES256 is a configuration change rather than a rewrite.
How can I help you explore Laravel packages today?