authorize
function authorize<Action, Resource, Grant>( who, input, options): Promise<boolean>;Defined in: src/server/http.ts:224
Authorize an authenticated request. A scoped principal is decided by
scope alone — the host’s provider is not consulted (defence in depth:
a permissive host policy can’t widen a token).
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Action extends string |
Resource |
Grant |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
who |
Authenticated<Grant> |
input |
{ action: Action; request: Request; resource: Resource; } |
input.action |
Action |
input.request |
Request |
input.resource |
Resource |
options |
AuthorizeOptions<Action, Resource, Grant> |
Returns
Section titled “Returns”Promise<boolean>