@xtandard/entitlements/next
Next.js App Router adapter: toNextHandler(panel) → the GET / POST / …
exports of a catch-all route, and withEntitlement(handler, options) guards a
route handler (402 / 403 JSON for denials).
import { … } from "@xtandard/entitlements/next";Functions
Section titled “Functions”| Name | Summary |
|---|---|
entitlementsPanel |
Create the panel (a createFetchHandler result) — pass it to toNextHandler. |
withEntitlement |
Wrap an App Router route handler with an entitlement guard. The handler’s second argument is Next’s route context ({ params }) plus entitlement. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
WithEntitlementOptions |
Options for withEntitlement. |
Re-exports
Section titled “Re-exports”| Name | Documented on |
|---|---|
EntitlementsPanelOptions |
@xtandard/entitlements |
RequireEntitlementOptions |
@xtandard/entitlements |