Skip to main content

Module oauth

Module oauth 

Source
Expand description

OAuth 2.1 Authorization Server for hyprstream.

Provides OAuth 2.1 (draft-ietf-oauth-v2-1-13) authorization serving both MCP (:6790) and OAI (:6789) as protected resources.

§Standards

  • OAuth 2.1 (draft-ietf-oauth-v2-1-13)
  • RFC 8414 (Authorization Server Metadata)
  • RFC 7591 (Dynamic Client Registration)
  • RFC 8707 (Resource Indicators)
  • RFC 8628 (Device Authorization Grant)
  • RFC 9728 (Protected Resource Metadata)
  • Client ID Metadata Documents (draft-ietf-oauth-client-id-metadata-document-00)

§Architecture

OAuth Server (:6791)
  /.well-known/oauth-authorization-server  → metadata
  /oauth/register                          → dynamic registration
  /oauth/authorize                         → consent + auth code
  /oauth/token                             → PKCE + PolicyClient delegation
  /oauth/jwks                              → JSON Web Key Set (RFC 7517)
  /oauth/device                            → device authorization (RFC 8628)
  /oauth/device/verify                     → user verification page

Modules§

auth
Bearer token authentication middleware for the OAuth service.
authorize
OAuth 2.1 Authorization Endpoint.
browser_session
Browser-facing ATProto session exchange and viewer context.
challenge
Shared Ed25519 challenge-response verification for OAuth endpoints.
cimd_cache
Client ID Metadata Document cache.
client_auth
OAuth 2.1 client authentication at the token endpoint.
deployment_well_known
Deployment static well-known endpoints (#1137 / #1136 serving half).
device
RFC 8628 Device Authorization Grant.
device_enrollment
Anonymous device identity enrollment — POST /api/device/challenge and /api/device/enroll.
did_document
did:web document endpoints (Phase 0c).
dpop
RFC 9449 DPoP (Demonstrating Proof-of-Possession) proof verification.
federation_entity
OpenID Federation 1.0 entity configuration endpoint.
identity_registration
Identity registration, federation-intake, and public resolution HTTP face.
introspection
RFC 7662 Token Introspection endpoint.
jwks
GET /oauth/jwks — JSON Web Key Set (RFC 7517).
jwt_bearer
RFC 7523 JWT Bearer assertion grant handler.
login_page
Provider selection login page for the OAuth authorize flow.
metadata
OAuth 2.1 / OpenID Connect discovery metadata.
mount_ticket
9P mount-ticket minting for K3a.
oauth2_userinfo
Generic OAuth 2.0 userinfo endpoint fetch and claim normalization.
oidc_callback
External OAuth/OIDC provider callback handler.
oidc_discovery
OIDC provider discovery and metadata caching.
par
Pushed Authorization Requests (RFC 9126).
registration
OAuth 2.1 Client Registration (RFC 7591) and Client ID Metadata Documents.
replay_key
Fixed-size keys for OAuth replay barriers.
replay_metrics
OpenTelemetry signals for fail-closed OAuth replay barriers.
revocation
OAuth 2.0 Token Revocation (RFC 7009).
rpc_handler
OAuth RPC handler for user CRUD operations.
scim
SCIM 2.0 HTTP handlers for user provisioning.
scim_types
SCIM 2.0 types for JSON serialization.
session
Server-side session management for the OAuth browser login flow.
spiffe
SPIFFE/JWT-SVID compatibility surface for the Kubernetes security spine.
state
OAuth 2.1 server state management.
token
OAuth 2.1 Token Endpoint.
token_exchange
RFC 8693 OAuth Token Exchange grant handler.
token_store
Persistent refresh token store abstraction.
user_mapping
User identity mapping from external OIDC providers to local hyprstream subjects.
user_service
Shared user CRUD logic for SCIM HTTP and ZMQ RPC transports.
userinfo
OpenID Connect UserInfo endpoint (OIDC Core Section 5.3).
wit_bootstrap
Browser WIT bootstrap endpoint — DISABLED for v16 (frozen A).
xrpc
com.atproto.* XRPC server surface — MVP public-read slice (#1112).

Structs§

OAuthService
ProtectedResourceMetadata
RFC 9728 Protected Resource Metadata.

Constants§

SERVICE_NAME
Service name for registry and logging

Functions§

create_app
Create the OAuth Axum router.
protected_resource_metadata
Create a Protected Resource Metadata response (RFC 9728).