Skip to content

Commit b720810

Browse files
authored
docs(client): document ClearanceOptions.scope as reserved (#41)
1 parent d3cb79e commit b720810

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16+
- **`ClearanceOptions.scope` is documented as reserved.** It was described as a route-group scope that limits where a token is valid. No validator enforces that: a clearance token is bound to the organization, and each protected path's verification level is the way to require stronger proof. Passing `scope` (or `data-scope` on the script tag) still works and still has no effect.
17+
1618
- **One adapter core.** Express, Fastify, Next.js (middleware and Pages wrapper) and the fetch guard each carried their own copy of skip-path matching, the 429 and 403 payloads, and honeytoken arming — five copies of one set of decisions, and five places the next correction can fail to land. They now share `adapter-core.ts`; the framework-specific response mechanics are untouched, and every honeytoken-injection test passes unchanged. Fastify keeps its awaited arming, which has no window where early requests are served without the link.
1719

1820
## [0.13.0] - 2026-08-22

‎packages/client/src/clearance.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ export interface ClearanceOptions {
152152
siteKey: string;
153153
/** WebDecoy ingest origin. Defaults to DEFAULT_INGEST_URL. */
154154
ingestUrl?: string;
155-
/** Route-group scope; '' = tenant-wide (default), valid on every route. */
155+
/**
156+
* Reserved. Sent with the mint request, but no validator restricts a token by
157+
* it. A clearance token is bound to the organization: any of its sites accepts
158+
* it, subject to expiry, the fingerprint deny list and the verification level
159+
* required by the path it is used on. Use a path's verification level to ask
160+
* for stronger proof on sensitive routes.
161+
*/
156162
scope?: string;
157163
/**
158164
* Collect interaction aggregates and upgrade the token to a graded

0 commit comments

Comments
 (0)