Skip to content

ScopedAuth

Defined in: src/server/http.ts:156

How a product verifies its scoped (portal / viewer) tokens.

Type Parameter
Grant
Property Type Description Defined in
prefix string The token prefix ("whpt_"…). A Bearer <prefix>… header takes the scoped lane. src/server/http.ts:158
principal(grant): Principal;

Defined in: src/server/http.ts:162

The principal a verified grant acts as (e.g. { id: "portal:acme" }).

Parameter Type
grant Grant

Principal


verify(token, request): Promise<Grant>;

Defined in: src/server/http.ts:160

Verify the token; throw (e.g. a TokenError) when it is invalid or expired.

Parameter Type
token string
request Request

Promise<Grant>