From 7bdb762b94ea87d4ade19564559a596fd559ca16 Mon Sep 17 00:00:00 2001 From: Headgent Development Date: Tue, 21 Jul 2026 12:14:50 +0200 Subject: [PATCH] =?UTF-8?q?fix(docs):=20jardissupport/contract=20=E2=86=92?= =?UTF-8?q?=20jardissupport/contracts=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fleet-Relaunch v1 follow-up: docs still referenced the pre-rename singular package name. --- .claude/skills/support-auth/SKILL.md | 2 +- AGENTS.md | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude/skills/support-auth/SKILL.md b/.claude/skills/support-auth/SKILL.md index 2522ac7..8a34996 100644 --- a/.claude/skills/support-auth/SKILL.md +++ b/.claude/skills/support-auth/SKILL.md @@ -109,7 +109,7 @@ Plain readonly data objects — no interface, no dispatcher dependency. Caller d | `TokenRevokedException` | extends `AuthenticationException` | | `UnauthorizedException` | extends `RuntimeException`, NOT `AuthenticationException` | -## CONTRACTS (`jardissupport/contract`) +## CONTRACTS (`jardissupport/contracts`) | Interface | Methods | |-----------|---------| | `TokenStoreInterface` | `store`, `find`, `revoke`, `revokeAllForSubject`, `deleteExpired` — **consumer must implement** | diff --git a/AGENTS.md b/AGENTS.md index 53fd2ed..d35ed5e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Authentication, session management, password hashing, and RBAC — no HTTP layer - **Strict Orchestrator Pattern:** Four Orchestrators in `src/` root compose themselves from Closures (`src/Handler/{Category}/`) via `->__invoke(...)` binding in the constructor. Orchestrators have **zero business logic** — only delegation. - **Events are plain readonly data objects** under `src/Data/Event/` (`AuthenticationSucceeded/Failed`, `SessionCreated/Refreshed/Invalidated`, `AllSessionsInvalidated`) — no interface, no Dispatcher. `SessionManager::create()/refresh()` return `SessionResult` with events; `invalidate()/invalidateAll()` return the event directly. The caller dispatches itself. -- **`TokenStoreInterface` must be implemented by the consumer** (from `jardissupport/contract`). No default store in the package — the test fake `InMemoryTokenStore` lives in `tests/Support/`, not in `src/`. `PasswordHasher::argon2id(memoryCost, timeCost, threads)` or `::bcrypt(cost)` as Factory Named Constructors. +- **`TokenStoreInterface` must be implemented by the consumer** (from `jardissupport/contracts`). No default store in the package — the test fake `InMemoryTokenStore` lives in `tests/Support/`, not in `src/`. `PasswordHasher::argon2id(memoryCost, timeCost, threads)` or `::bcrypt(cost)` as Factory Named Constructors. - **`Guard` against immutable `Policy` via `PolicyBuilder`:** `role()->allow()->deny()->includes()->build()`. Rule semantics: **deny overrides allow**, role inheritance via `includes('editor')`. `check()` returns bool, `authorize()` throws `UnauthorizedException` (extends `RuntimeException`, **not** `AuthenticationException`). - **Multi-role support:** `$session->getMetadata()['role']` may be `string` or `string[]` — `CheckPermission` iterates the list, **first match wins**. Permission format `"resource:action"` via `Permission::from()` with wildcard support. - **Public error messages stay generic** (`"Invalid credentials"`), details are only in the events. `AuthenticationResult` implements `AuthResultInterface` — usable as both rich result and contract type. Exception hierarchy: `AuthenticationException` (base) → `InvalidCredential`/`TokenExpired`/`TokenRevoked`; `UnauthorizedException` separate. diff --git a/README.md b/README.md index 665cb93..cb3223f 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ tests/Integration/ ## Contracts -Defined in `jardissupport/contract` — implement these in your infrastructure: +Defined in `jardissupport/contracts` — implement these in your infrastructure: | Interface | Purpose | |-----------|---------|