Download the PHP package clawdreyhepburn/aauth-php without Composer

On this page you can find all versions of the php package clawdreyhepburn/aauth-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aauth-php

aauth-php

Packagist version PHP version CI status

PHP verifier for AAuth — the agent-authentication scheme being standardized in IETF. Drop a single file onto a shared host (Apache + PHP, no Composer needed) and your site can verify requests from AI agents end-to-end.

Status: v0.1.x — runs the live demo at wisdom.clawdrey.com. Public API may still shift before v1.0.

Why a PHP implementation

The two existing AAuth libraries target Node.js and Python. That covers modern services and ML stacks, but it leaves out the long tail of the web: WordPress, Drupal, every small-business CMS, every blog. If AAuth is going to be a web-scale identity layer for AI agents, it needs a PHP story. This is that.

This library is intentionally:

Sibling implementations

Cross-implementation interop tests live under tests/fixtures/ — the PHP verifier verifies signed requests captured from the TypeScript signer byte-for-byte.

Install

Single-file (shared hosting friendly)

Grab aauth-bundle.php from the latest release (it's also tracked at dist/aauth-bundle.php in the repo) and drop it next to your application:

No Composer, no autoloader, no other files. The bundle is ~50 KB of pure PHP and parses on any PHP 8.1+ host with the openssl and sodium extensions (both bundled with PHP since 7.2).

Composer

The package is published on Packagist: clawdreyhepburn/aauth-php.

You get PSR-4 autoloading under Clawdrey\AAuth\; no require_once needed.

Quickstart

That's the whole integration: ~20 lines in front of your handler.

What gets verified

Every successful call to RequestVerifier::verifyRequest proves all of:

  1. The Signature-Key header carries a valid aa-agent+jwt issued by the agent's home origin (fetched live from https://<iss>/.well-known/jwks.json, cached on disk).
  2. The JWT's cnf.jwk (proof-of-possession key) actually signed the HTTP request, with the signature base computed exactly per RFC 9421.
  3. The signature's created timestamp is within ±60 s of server time (replay window).
  4. The JWT itself is unexpired, untampered, and uses one of the algorithms AAuth permits (ES256 or EdDSA).

Algorithm support: ES256 (P-256) and EdDSA (Ed25519). RSA is intentionally not supported.

How it works

A verification has five stages, all driven by RequestVerifier::verifyRequest():

  1. Parse the AAuth headersSignature-Input, Signature, and Signature-Key. Extract the aa-agent+jwt token from Signature-Key, read its kid and iss.
  2. Fetch the JWKS for the issuer over HTTPS, with on-disk caching. The fetcher refuses non-HTTPS endpoints by default (and always rejects file://, ftp://, javascript:, etc.).
  3. Verify the JWTES256 or EdDSA, with iat/exp/nbf/typ checks and configurable leeway. Pull the proof-of-possession key out of cnf.jwk.
  4. Verify the HTTP signature per RFC 9421: rebuild the signature base from the covered components, enforce the ±60 s replay window on created, and verify with the cnf.jwk. Raw r||s ↔ DER conversion happens transparently for ES256.
  5. Return a VerifyResult with agentSub, agentIss, kid, alg, and the RFC 7638 thumbprint jkt. Any failure along the way throws an AAuthException you catch and turn into a 401.

Live demo

wisdom.clawdrey.com is a real public resource served by this library.

Documentation

Repository layout

Tests

193 tests across the crypto primitives, signature-base construction, JWT verification, the full request-verification pipeline, JWKS-fetcher safety gates, and a single-file-bundle smoke test. The most important ones replay real signed requests captured from the TypeScript reference implementation, byte-equal against PHP's reconstructed signature base.

Contributing

One-command quality gate: composer check. That runs composer validate --strict, the test suite, every PHP code block in this README + the cookbook, and PHPStan at level 8. CI runs the same gate on PHP 8.1 / 8.2 / 8.3 / 8.4.

See CHANGELOG.md for release notes and SECURITY.md for the disclosure policy.

License

Copyright © 2026 Clawdrey Hepburn.

Licensed under the Apache License, Version 2.0 — a permissive, OSI-approved license that:

The full text is in LICENSE. When in doubt, prefer the file over this summary.


All versions of aauth-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-openssl Version *
ext-sodium Version *
ext-json Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clawdreyhepburn/aauth-php contains the following files

Loading the files please wait ...