UCAN Token Operations
User-Controlled Authorization Networks (UCAN) provide a decentralized authorization mechanism that enables flexible, portable, and secure token-based access control.Overview
UCAN tokens are JWT-based authorization tokens that allow:- Decentralized identity verification
- Granular access control
- Delegatable permissions
- Cryptographic proof of authorization
Token Structure
A UCAN token consists of:- Issuer DID
- Audience DID
- Capabilities (Attenuations)
- Proofs (Optional parent tokens)
- Time-based constraints
Creating Origin Tokens
An origin token is the first token in a delegation chain:Creating Attenuated Tokens
Attenuated tokens derive from existing tokens, further restricting capabilities:Token Validation Workflow
Capability Patterns
Read Capabilities
Write Capabilities
Practical Examples
Decentralized File Sharing
Security Considerations
- Use the shortest possible token lifetime
- Implement granular capabilities
- Validate all tokens before use
- Rotate keys regularly
- Log and monitor token usage
Performance Optimization
- Cache validated tokens
- Use efficient JWT parsing
- Implement token revocation lists