Files
agentrhq__authsome/src/authsome/auth/models/enums.py
T
Manoj Bajaj ea42284ff8 feat: add ProviderType classification and JSONC support for providers
Adds a `type` field (app | llm | mcp) to ProviderDefinition so consumers
can filter and display providers by category. Backfills all 71 bundled
providers. Also introduces a `parse_jsonc` utility that strips // and /* */
comments before JSON parsing, and wires it into the bundled loader and the
CLI register command so both .json and .jsonc provider files are accepted.

Closes #362

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 01:33:13 +05:30

48 lines
950 B
Python

"""Enumerations for auth types, flow types, connection statuses, and export formats."""
from enum import StrEnum
class AuthType(StrEnum):
"""Authentication mechanism used by a provider."""
OAUTH2 = "oauth2"
API_KEY = "api_key"
BROWSER = "browser"
class FlowType(StrEnum):
"""Specific authentication flow for a provider."""
PKCE = "pkce"
DEVICE_CODE = "device_code"
DCR_PKCE = "dcr_pkce"
API_KEY = "api_key"
BROWSER = "browser"
class ConnectionStatus(StrEnum):
"""Status of a credential connection."""
NOT_CONNECTED = "not_connected"
CONNECTED = "connected"
EXPIRED = "expired"
REVOKED = "revoked"
INVALID = "invalid"
class ProviderType(StrEnum):
"""High-level category for a provider."""
APP = "app"
LLM = "llm"
MCP = "mcp"
class ExportFormat(StrEnum):
"""Supported credential export formats."""
ENV = "env"
JSON = "json"
SHELL = "shell"