@xtandard/kit/authorization
@xtandard/kit/authorization — the authorization contract, generic over a
product’s action and resource unions, and defineActions to build a
product’s action constants. Implementations live on authorization/none,
authorization/roles and authorization/delegated.
import { … } from "@xtandard/kit/authorization";Functions
Section titled “Functions”| Name | Summary |
|---|---|
defineActions |
Build a product’s action constants from its lists. The const type parameter keeps the literal union, so a product can derive its action type from the list instead of writing it twice. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
ActionsDefinition |
Input to defineActions. |
ActionsDefinitionResult |
What defineActions returns. |
AuthorizationProvider |
Decides whether an action is permitted. |
AuthorizeInput |
Input passed to AuthorizationProvider.authorize. |