token_validate
Verify a security token's HMAC/Ed25519 signature, confirm it has not expired, and check it has not been revoked. Returns validation result.
Instructions
Verify a security token's HMAC/Ed25519 signature, confirm it has not expired, and check it has not been revoked. Read-only — never modifies token state. Returns {ok:true, valid:true, token:{...}} if the token passes all checks, or {ok:true, valid:false, reason:"..."} if it fails any check (reason indicates which check failed: "invalid_signature", "expired", or "revoked"). Returns {ok:false, error:"..."} if token_json is not valid JSON. Call before granting access to any protected resource; use token_revoke to invalidate a token that should no longer be trusted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token_json | Yes | JSON-encoded SecureToken object (as returned by token_create) |