atproto-client
AT Protocol HTTP client with authentication support.
Overview
HTTP client for AT Protocol services supporting DPoP, bearer tokens, and sessions with native XRPC protocol operations and repository management.
Features
- Multiple authentication methods: DPoP, Bearer tokens, and session-based authentication
- XRPC protocol support: Native support for AT Protocol's XRPC communication protocol
- Repository operations: Complete client for AT Protocol repository CRUD operations
- Session management: Authentication session creation, refresh, and validation
- URL utilities: Helper functions for AT Protocol URL construction and validation
CLI Tools
The following command-line tools are available when built with the clap feature:
atproto-client-auth: Create and refresh authentication sessions using identifier and passwordatproto-client-app-password: Make authenticated XRPC calls using app password Bearer tokensatproto-client-dpop: Make authenticated XRPC calls using DPoP (Demonstration of Proof-of-Possession) tokens
Usage
Basic HTTP Operations
use client;
use Client;
let http_client = new;
let response = get_json.await?;
DPoP Authentication
use ;
use identify_key;
let dpop_auth = DPoPAuth ;
let response = get_dpop_json.await?;
Repository Operations
use ;
let create_request = CreateRecordRequest ;
let response = create_record.await?;
Command Line Examples
Create and Manage Sessions
# Create an authentication session with username and password
# Use an existing app password for session creation
App Password Authentication
# Make an XRPC call using app password Bearer token
DPoP Authentication
# Make an authenticated XRPC call using DPoP tokens
License
MIT License