Overview
Grantex can issue W3C Verifiable Credentials (VCs) alongside standard RS256 JWTs. While grant tokens are optimized for real-time authorization (short-lived, revocation-checked, scope-enforced), Verifiable Credentials provide a portable, standards-compliant proof of authorization that any party can verify independently using the Grantex DID document.Verifiable Credentials are opt-in. Existing token exchange flows continue to work unchanged. Pass
credentialFormat: "vc-jwt" during token exchange to receive a VC alongside the standard grant token.Why Verifiable Credentials?
Grant tokens work well within systems that integrate with Grantex. But in agentic commerce, agents interact with third-party services that may have no relationship with Grantex:- A payment processor needs proof that the agent is authorized to spend on the user’s behalf
- A contract-signing service needs proof of human consent
- An insurance API needs proof of delegated authority from a specific principal
W3C Compliance
Grantex VCs conform to:Issuing a Verifiable Credential
Request a VC during token exchange by setting thecredentialFormat parameter:
Credential Types
AgentGrantCredential
Issued for direct grants (user authorizes an agent directly). The credential subject attests that a specific principal authorized a specific agent with specific scopes.DelegatedGrantCredential
Issued for delegated grants (agent delegates to a sub-agent). Includes the full delegation chain for traceability.FIDO Evidence
When the grant was approved via a FIDO2/WebAuthn assertion, the credential includes cryptographic proof of human presence:Verifying a VC
Using the Grantex SDK
Independent Verification
Any party can verify a Grantex VC without the SDK by:- Decoding the VC-JWT (standard JWT decode)
- Resolving the issuer DID (
did:web:grantex.devresolves tohttps://grantex.dev/.well-known/did.json) - Extracting the public key from the DID document
- Verifying the JWT signature against the public key
- Checking the
credentialStatusendpoint for revocation
Revocation via StatusList2021
Grantex uses the W3C StatusList2021 standard for credential revocation. Each VC references a position in a bitstring-based status list. When a grant is revoked, the corresponding bit is flipped.How It Works
- Each credential is assigned a
statusListIndex(a position in the bitstring) - The status list credential is published at a public URL (
/v1/credentials/status/:id) - When a grant is revoked, Grantex sets the bit at that index
- Verifiers fetch the status list and check the bit to determine revocation
Checking Status
Revocation Timing
When you revoke a grant (viaDELETE /v1/grants/:id, the permission dashboard, or cascade revocation), the following happens atomically:
- The grant record is marked as revoked
- The Redis revocation key is set (grant token rejected immediately)
- The StatusList2021 bit is flipped (VC shows as revoked)
- All delegated sub-grants are cascade-revoked (and their VCs)
Listing Credentials
Mastercard Verifiable Intent
Grantex VCs are designed for compatibility with the Mastercard Verifiable Intent specification for agentic commerce. The key alignment points are:API Reference
Next Steps
- FIDO2 / WebAuthn — passkey-based human presence verification
- DID Infrastructure — how the issuer DID works
- Grant Token — the standard JWT-based grant token
- Multi-Agent Delegation — delegation chains in VCs