noas / jwt
Zero-dependency native JWT verifier and signer for Noas.
Requires
- php: ^8.4
- noas/framework: ^0.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Native HS256 signing and verification for Noas, without third-party runtime packages. Bind the transport-independent port explicitly:
use Noas\Jwt\JwtVerifier; use Noas\Security\TokenVerifierInterface; $app->container()->bind( TokenVerifierInterface::class, static fn() => new JwtVerifier($secret), );
Use an application-managed secret, not a hard-coded production key. Bearer
authentication uses Noas\Middleware\BearerTokenMiddleware; HTTP rejections use
RFC 9457 Problem Details. The former HTTP token-verifier namespace has no alias.
Verified claims are named fields; signed JSON lists are rejected rather than
returned outside the port's array-of-named-claims contract.
After composer install, run composer ci with native assertions enabled by
the test script. Linting uses the same find/xargs tooling as the framework.