openagent-http · client
Declared module signatures, types, configuration, and source documentation.
Source: openagent-sdk/adapters/http/rust/src/client.rs. SHA-256: 49ea43248efb494f9d157791b6f6359a1970209f8005fc34e38ea48925ef950a.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
client::ClientConfig
Configuration for the HTTP auth client.
#[derive(Debug, Clone)]
pub struct ClientConfig {
/// The agent's DID. Reported to the server for audit and, where the
/// deployment resolves DIDs, for trust-tier assignment. The agent proves
/// possession of the key - lineage evaluation is the server's job.
pub did: String
}Source line: 24.
client::HttpAuthClient
HTTP client that performs the Core Protocol identity flow over REST.
pub struct HttpAuthClient {
}Source line: 32.
client::HttpAuthClient::new
Creates a new HTTP auth client.
Arguments
config: Agent identity configurationsigning_key_bytes: 32-byte Ed25519 signing key
pub fn new(
config: ClientConfig,
signing_key_bytes: &[u8; 32],
) -> Result<Self, AuthProtocolError>;Source line: 44.
client::HttpAuthClient::with_client
Creates a client with a custom reqwest::Client.
pub fn with_client(
config: ClientConfig,
signing_key_bytes: &[u8; 32],
client: reqwest::Client,
) -> Self;Source line: 58.
client::HttpAuthClient::authenticate
Performs the full identity flow against the given base URL.
- Discovers the auth endpoint via
GET /.well-known/openagent(tolerating discovery failure and falling back to the default path) - Fetches an
openagent-challenge-v1challenge - Signs the JCS-canonical challenge bytes and proves
- Returns an [
AuthenticatedSession] carrying the session token
pub async fn authenticate(
&self,
base_url: &str,
) -> Result<AuthenticatedSession, AuthProtocolError>;Source line: 79.