type
PreviewToken
One short-lived read-only resource capability.
Properties
| Property | Type | Description |
|---|---|---|
Token | string | Short-lived bearer secret accepted only by preview reads. |
Resource | string | Resource kind: collection or global. |
Slug | string | Exact collection or global slug. |
DocumentID | string | Exact collection document identity; empty for a global. |
ExpiresAt | time.Time | Absolute token expiry time. |
How it works
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.
Full signature
type PreviewToken struct {
Token string
Resource string
Slug string
DocumentID string
ExpiresAt time.Time
}