Skip to content

GrantMinter

type GrantMinter = (principal, purpose, scopes, ttlSeconds) =>
| IssuedGrant
| Promise<IssuedGrant>;

Defined in: src/token-identity.ts:513

Mints a standing grant for principal – always the calling user.

ttlSeconds is a request, not an instruction: the worker may return a shorter lifetime, and the returned expiresAt is authoritative.

Parameter Type
principal string
purpose string
scopes readonly string[]
ttlSeconds number

| IssuedGrant | Promise<IssuedGrant>