Download the PHP package milpa/auth-webauthn without Composer
On this page you can find all versions of the php package milpa/auth-webauthn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download milpa/auth-webauthn
More information about milpa/auth-webauthn
Files in milpa/auth-webauthn
Download milpa/auth-webauthn
More information about milpa/auth-webauthn
Files in milpa/auth-webauthn
Vendor milpa
Package auth-webauthn
Short Description Passkey / WebAuthn adapter for the Milpa PHP framework: the lbuchs/webauthn implementation of milpa/auth's WebAuthnVerifier, plus in-memory challenge and credential stores. Ceremony types and contracts live in milpa/auth. A verified assertion mints a session — it is never a per-request transport. Zero framework, zero ORM.
License Apache-2.0
Package auth-webauthn
Short Description Passkey / WebAuthn adapter for the Milpa PHP framework: the lbuchs/webauthn implementation of milpa/auth's WebAuthnVerifier, plus in-memory challenge and credential stores. Ceremony types and contracts live in milpa/auth. A verified assertion mints a session — it is never a per-request transport. Zero framework, zero ORM.
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package auth-webauthn
# Milpa Auth-WebAuthn
> Passkey / WebAuthn adapter for the Milpa PHP framework: a
> [lbuchs/webauthn](https://github.com/lbuchs/WebAuthn) implementation of `milpa/auth`'s
> `WebAuthnVerifier`, plus in-memory challenge and credential stores.
[](LICENSE)
[](https://www.php.net/)
**A verified WebAuthn assertion mints a session — it is never a per-request transport.**
`milpa/auth-webauthn` sits one tier above [`milpa/auth`](https://github.com/getmilpa/auth):
`milpa/auth` owns the ceremony vocabulary (`RelyingParty`, `Contracts\WebAuthnVerifier`, the
assertion/registration value objects). This package implements that port with `lbuchs/webauthn`
and ships in-memory stores for tests and zero-file consumers. Zero framework, zero ORM.
## Install
## What this package is
`milpa/auth-webauthn` is the cryptography adapter for a WebAuthn/FIDO2 ceremony: a
`lbuchs/webauthn`-backed `Adapter\LbuchsWebAuthnVerifier` that implements
`Milpa\Auth\WebAuthn\Contracts\WebAuthnVerifier` (defined in `milpa/auth`), plus
`InMemoryChallengeStore` and `InMemoryWebAuthnCredentialStore` as reference implementations
for tests and zero-file consumers. See [ADR 0001](docs/adr/0001-webauthn-mints-a-session.md)
for the three decisions this shape commits to. The ceremony types themselves
(`RelyingParty`, `WebAuthnAuthenticationResponse`, `WebAuthnAssertionResult`, …) resolve
from `milpa/auth`.
**A verified assertion mints a session — it is never a per-request transport**, so `WebAuthnVerifier`
is deliberately not a `Milpa\Auth\Contracts\CredentialVerifier`. `verifyAuthentication()` returns proof
(`WebAuthnAssertionResult`), and the host — not this package — turns that proof into a
`Milpa\Auth\SessionRecord` a later request resolves via `Milpa\Auth\Http\StartSession`.
## The shape
Registration is the mirror image: `createRegistrationOptions(Actor, RelyingParty, WebAuthnRegistrationContext)`
issues a challenge and creation options; `verifyRegistration(WebAuthnRegistrationResponse, RelyingParty)`
verifies the (`'none'`) attestation and returns a `WebAuthnCredentialRecord` for the host to `save()`.
## The three seams a host implements
| Contract | Its one job |
|---|---|
| `ChallengeStore` | `issue`/`consume` a single-use, expiring `ChallengeRecord` between a ceremony's two round-trips. |
| `WebAuthnCredentialStore` | `save`/`findByCredentialId`/`listForActor`/`updateSignCount` — the registered-passkey registry. |
| `RelyingPartyResolver` | `resolve(ServerRequestInterface): RelyingParty` — which RP a request's ceremony runs under (host-header, tenant path, …), never a single env-static value. |
`InMemoryChallengeStore` and `InMemoryWebAuthnCredentialStore` are the reference implementations —
array-backed, with an injectable clock, good for tests and zero-file consumers. Neither is safe for a
clustered production deployment: **`ChallengeStore::consume()` MUST be atomic (delete-on-read) in any
production implementation**, or a challenge issued once could be read and reused by two concurrent
requests before either commits its removal. A host ships its own store (Doctrine, Redis, …) behind the
same contract for that guarantee.
## Non-goals, stated on purpose
- **No enterprise attestation.** The shipped adapter fixes attestation to `'none'` — it proves
possession of a key bound to the RP, not the authenticator's make/model/manufacturer chain.
Verifying a specific authenticator's provenance is a **future adapter** behind the same
`WebAuthnVerifier` port (see [ADR 0001](docs/adr/0001-webauthn-mints-a-session.md)), not a mode
flag on this one.
- **No auth-strength on `Actor`.** This package does not add a "how strongly was this actor
authenticated" field to `milpa/auth`'s `Actor` or `AuthContext`. `CredentialType::Passkey` is a
vocabulary marker for logs, UI, and reports — not a policy input `milpa/auth` exposes today.
- **No `Credential::passkey()` factory.** A passkey ceremony is stateful and two-round-trip, never a
single-shot secret a `CredentialVerifier` checks. Passkey exists as a credential type in the
vocabulary, not as a per-request `Credential` factory.
## Requirements
- PHP **≥ 8.3**
- `milpa/auth` `^0.9` (ceremony types, contracts, and the identity vocabulary)
- `lbuchs/webauthn` `^2` (the shipped cryptography adapter)
- `psr/http-message` (the `RelyingPartyResolver` seam)
- `ext-openssl`, `ext-mbstring`, `ext-sodium`
## License
[Apache-2.0](LICENSE) © Rodrigo Vicente - TeamX Agency.
---
Milpa is developed and maintained by [TeamX Agency](https://teamx.agency).
All versions of auth-webauthn with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.3
milpa/auth Version >=0.9 <1.0
lbuchs/webauthn Version ^2
psr/http-message Version ^1 || ^2
ext-openssl Version *
ext-mbstring Version *
ext-sodium Version *
milpa/auth Version >=0.9 <1.0
lbuchs/webauthn Version ^2
psr/http-message Version ^1 || ^2
ext-openssl Version *
ext-mbstring Version *
ext-sodium Version *
The package milpa/auth-webauthn contains the following files
Loading the files please wait ...