Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalid = errors.New("token: invalid")
ErrInvalid is a single opaque error so callers cannot distinguish failure reasons.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
ContextID string `json:"-"` // filled in by Verify from the request, never serialized
Sub string `json:"sub"` // agent role bound to this token
Owner bool `json:"own,omitempty"` // true only for the creator token (may issue participant tokens / close)
Ver int `json:"ver"`
Exp int64 `json:"exp"`
}
Claims is the token body, kept intentionally small to minimize token length. The context id and audience are NOT stored here; they are folded into the MAC input instead, so the token stays bound to one context without carrying the id.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager signs with cur and verifies against cur then prev (for zero-downtime rotation).
Click to show internal directories.
Click to hide internal directories.