Crate atproto_oauth_axum

Source
Expand description

§AT Protocol OAuth Axum Integration Library

Axum web framework integration for AT Protocol OAuth workflows with comprehensive handler implementations for OAuth endpoints. Provides production-ready web handlers for OAuth authorization, callback processing, and JWKS endpoint management.

§Key Features

  • Axum Integration: Native Axum web framework handlers for OAuth endpoints
  • OAuth Workflow Handlers: Complete OAuth authorization and callback processing
  • JWKS Endpoint: JSON Web Key Set endpoint for public key distribution
  • Metadata Endpoints: OAuth authorization server metadata endpoint implementation
  • State Management: Secure OAuth state and request management with storage abstraction
  • Error Handling: Comprehensive error handling with proper HTTP status codes

§Architecture

The library provides Axum-compatible handlers and state management:

  • handle_init: OAuth authorization initiation handler
  • handle_complete: OAuth callback and completion handler
  • handle_jwks: JWKS (JSON Web Key Set) endpoint handler
  • handler_metadata: OAuth authorization server metadata handler
  • state: Shared application state management for OAuth operations
  • errors: Specialized error types for web handler operations

§Command-Line Tools

When built with the clap feature, provides OAuth management tools:

  • atproto-oauth-tool: Command-line OAuth login, token management, and workflow testing

Modules§

errors
Structured Error Types for OAuth Axum Handlers
handle_complete
OAuth authorization callback handler.
handle_jwks
OAuth JSON Web Key Set (JWKS) endpoint handler.
handler_metadata
OAuth client metadata endpoint handler.
state
Axum state management for OAuth client configuration.