DeviceCodeResponse (core/downstream_oauth.py)

jarvis-registry · registry-pkgs/src/registry_pkgs/core/downstream_oauth.py · python · Apache-2.0
auth

Provides Pydantic models and utility functions for managing OAuth 2.0 device authorization flows, including secure user code generation.

# Source: https://github.com/ascending-llc/jarvis-registry | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Shared identifiers for the downstream MCP OAuth flow (Layer B: registry-as-AS).

The downstream issuer string is an exact-match security contract: the registry mints and verifies
it, and the auth-server advertises it via RFC 9728 / RFC 8414. It must stay byte-identical across
both workspaces, so the single source of truth lives here in ``registry-pkgs`` where both
``registry`` and ``auth-server`` can import it.
"""

import secrets
import string

from pydantic import BaseModel

DOWNSTREAM_OAUTH_NAMESPACE = "proxy/server/oauth"

# Redis key prefix for a Layer B authorization 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key