type

PreviewToken

type PreviewToken struct { Token string Resource string Slug string DocumentID string ExpiresAt time.Time }

One short-lived read-only resource capability.

Source core/preview.go:22

Tokenstring
Short-lived bearer secret accepted only by preview reads.
Resourcestring
Resource kind: collection or global.
Slugstring
Exact collection or global slug.
DocumentIDstring
Exact collection document identity; empty for a global.
ExpiresAttime.Time
Absolute token expiry time.

The token is read-only and scoped to one exact resource. Treat Token as a bearer secret and pass it only to the intended preview frontend.