PasskeyLogin
Turns a passkey authentication into a session — the WEB counterpart of what a signed `session:own` is on the CLI (greenhouse H-PASSKEY-4). This is where the passkey path MEANS something: a ceremony that only verifies is a lab check; one that mints a session is a login. It holds the same discipline the gpg path does (decisions/0117): possession is not identity. A verified passkey proves the holder controls a registered authenticator; whether the house RECOGNIZES that credential — and with what scopes — is a separate question a resolver answers. An unrecognized passkey authenticates cryptographically and still gets no session, exactly as an unenrolled gpg key gets no principal. The resolver is where the passkey path meets the SAME recognition model as the key path.
PasskeyLogin::__construct()
public function __construct(Milpa\Auth\WebAuthn\PasskeyAuthenticator $authenticator, Milpa\Auth\Contracts\SessionStore $sessions, callable $scopesFor, int $ttlSeconds = 3600, ?callable $clock = null):Parameters
| Name | Type | Description |
|---|---|---|
| $authenticator | Milpa\Auth\WebAuthn\PasskeyAuthenticator | |
| $sessions | Milpa\Auth\Contracts\SessionStore | |
| $scopesFor | callable(string): (list<string> | null) | the scopes the house recognizes for a credential id, or null for one it does not |
| $ttlSeconds | int | |
| $clock | (callable(): \DateTimeImmutable | null) | the current time, injectable for tests |
PasskeyLogin::login()
public function login(string $rpId, string $credentialId, string $clientDataJson, string $authenticatorData, string $signature): ?Milpa\Auth\SessionRecordAuthenticate a passkey and, if the house recognizes it, mint a session — or return null.
Parameters
| Name | Type | Description |
|---|---|---|
| $rpId | string | |
| $credentialId | string | the credential the client says answered |
| $clientDataJson | string | the browser's clientDataJSON bytes |
| $authenticatorData | string | the authenticatorData bytes |
| $signature | string | the assertion signature |