klieo-auth-common 2.1.0

Shared authentication traits and types for klieo HTTP transports
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Minimal read-only header bag consumed by [`crate::Authenticator`].

/// Minimal read-only header bag used by
/// [`Authenticator::authenticate`](crate::Authenticator::authenticate).
///
/// Both A2A and MCP transports implement this for their respective
/// header extraction types so the trait stays protocol-agnostic.
///
/// Lookup is case-insensitive — implementations MUST fold `name`
/// before comparing against the underlying header bag.
pub trait Headers: Send + Sync {
    /// Return the first value of `name` (case-insensitive), if present.
    fn get(&self, name: &str) -> Option<&str>;
}