Skip to content

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 Parameter
Action extends string
Resource
Grant
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>

Promise<boolean>