Commit graph

2 commits

Author SHA1 Message Date
DJP
0c799aebe7 Implement proper Box JWT authentication with RSA signing
Box now uses JWT (JSON Web Token) authentication:
- Signs JWT with RSA private key from config
- Uses RS256 algorithm
- Enterprise-level access
- No expiring developer tokens

JWT Flow:
1. Create JWT header with publicKeyID
2. Create claims with enterprise ID
3. Sign with encrypted private key + passphrase
4. Exchange JWT for access token
5. Token auto-refreshes as needed

Config loaded from: Box-config.json (complete JWT config)

This is the proper production-ready authentication method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 14:07:52 -04:00
DJP
36d45ae188 Add Box.com integration for asset storage with unique ID tracking
New Box Integration Features:
- BoxClient class for Box API operations
- IDGenerator for 6-character unique IDs (A-Z a-z 0-9)
- Auto-create campaign folders in Box
- Rename files with unique ID suffix (filename_ID.ext)
- Upload metadata JSON to Box custom fields
- Track Box file IDs and URLs

Download Workflow Enhancement:
- New button: '📥📦 Download & Upload to Box'
- Downloads from DAM → Uploads to Box
- Each file gets unique 6-char ID
- Creates campaign folder: {campaign_id}_{campaign_name}
- Results show: original → renamed filename with ID

Box Configuration:
- Developer Token: e7Q1kS6rOM1tH2ezzCg4KgRfcyNW2JHI
- Root Folder: 348304357505
- OAuth creds in Box-config.json

ID Generation:
- Phase 1: Random 6-char (current)
- Phase 2: PostgreSQL DB via REST API (ready to integrate)

Metadata Storage:
- Stored in Box file description (custom metadata field later)
- Full DAM metadata JSON preserved
- Includes: asset_id, campaign info, all metadata fields

Ready for testing! Download workflow now stores assets in Box with tracking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 13:11:49 -04:00