1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Auth-oriented request middleware: authentication, authorisation, and
//! inbound credential forwarding.
//!
//! [`A2aMiddleware`] runs at the Tower layer before any handler or
//! JSON-RPC dispatch and is composed via [`MiddlewareStack`] (AND
//! semantics) or [`AnyOfMiddleware`] (OR with documented precedence).
//! Concrete implementations live in `turul-a2a-auth` (`BearerMiddleware`,
//! `ApiKeyMiddleware`) and `turul-a2a-aws-lambda`
//! (`LambdaAuthorizerMiddleware`).
//!
//! Non-auth interception — metrics, rate-limiting, tracing, structured
//! logging — should be a separate Tower layer composed outside this
//! module. This trait's surface (`before_request` only, failure shaped
//! for 401 / 403 + `WWW-Authenticate`) is deliberately auth-oriented.
pub use ;
pub use ;
pub use AuthLayer;
pub use ;
pub use ;
/// Paths that bypass auth and transport-compliance validation. Today this
/// is just the discovery endpoint — extended cards remain auth-required
/// per A2A spec. Both `AuthLayer` and `TransportComplianceLayer` consult
/// this list.
pub const BYPASS_PATHS: & = &;
pub