Type Alias: ScopeFromActor<S, P>
ScopeFromActor<
S,P> = (actor,grant) =>MintedScope<S,P>
Defined in: packages/messaging/src/ports.ts:183
The one function that turns an actor into a scope: scopeFromActor in
@oktoid/authz, which only this package may import (chapter 30; the lint fence).
It is a parameter here because packages/authz is S9; this file is where S9's
import lands.
Contract: a TenantActor yields a tenant Scope and never needs evidence; a
PlatformActor yields a PlatformScope ONLY when grant is present, and must
throw otherwise (this package has already refused, so a throw here is a defect).
It must never mint a tenant Scope from a PlatformActor, and a platform scope
carries grant.key as its key: the receiver types the handler's scope as minted
for the handler's own key on that promise.
Type Parameters
S
S
P
P
Parameters
actor
grant
PlatformGrantEvidence | undefined
Returns
MintedScope<S, P>