Internal base classes and shared helpers for auth provider implementations.
This is the shared contract for all auth providers.
AuthManifest: what the UI needs to render auth inputs
AuthManifest
AuthStatus: connected/disconnected state returned to the UI
AuthStatus
AuthProvider (Protocol): required methods providers must implement
AuthProvider
If a provider follows this contract, it can plug into:
the auth registry
the UI “Connect” flow
config persistence
providers/auth/_auth_base.py
manifest()
start(cfg, redirect_uri=...)
finish(cfg, payload=...)
refresh(cfg) (optional depending on provider)
refresh(cfg)
disconnect(cfg)
sequenceDiagram participant UI as UI/API participant Auth as Auth Provider participant Ext as External Service participant CFG as config.json UI->>Auth: manifest() UI->>Auth: start(cfg, redirect_uri) Auth->>Ext: request device/PIN or oauth step Auth-->>UI: code / url / polling hints UI->>Auth: finish(cfg, payload) Auth->>Ext: exchange code/token Auth->>CFG: save tokens/secrets Auth-->>UI: AuthStatus (connected)
Last updated 5 hours ago
Was this helpful?