@xtandard/kit/tokens
@xtandard/kit/tokens — scoped HMAC tokens (the products’ portal and viewer
tokens): <prefix><payload>.<signature>, WebCrypto only, with secret
rotation.
import { … } from "@xtandard/kit/tokens";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createScopedTokens |
Create a product’s scoped-token codec. |
Classes
Section titled “Classes”| Name | Summary |
|---|---|
TokenError |
Base class of every scoped-token error. Maps to HTTP 401 at the API layer. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
CreateTokenOptions |
Per-call options for ScopedTokens.create. |
ScopedTokens |
What createScopedTokens returns. |
ScopedTokensOptions |
Options for createScopedTokens. |
VerifiedToken |
A verified token: its claims and expiry. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
TokenSecret |
One secret, or a rotation list (the first one signs, all of them verify). |