
    iu                         d Z dZy)uW  
GHL OAuth Marketplace App — Permanent Token Management System

This module provides:
- OAuth 2.0 flow for GHL Marketplace App (Custom/Private)
- Per-location token exchange via /oauth/locationToken
- Encrypted token storage in PostgreSQL
- Proactive token refresh with Redis distributed locks
- GHL API client that auto-selects the right token per location

Architecture:
    GHL Marketplace App (Custom/Private)
        → Agency Install → agency access_token + refresh_token
        → Per Location: POST /oauth/locationToken
            → SA-001 access_token
            → SA-002 access_token
            → ... (all 10+ sub-accounts)

This permanently solves the GHL sub-account API access blocker.
Agency-level Private Integration tokens cannot access sub-account resources.
OAuth with /oauth/locationToken is the only scalable solution.
z1.0.0N)__doc____version__     +/mnt/e/genesis-system/GHL/oauth/__init__.py<module>r      s   . r   