pub struct ApiKeyMiddleware { /* private fields */ }Expand description
API Key auth middleware.
Extracts API key from a configurable header and validates via ApiKeyLookup.
Rejects empty/whitespace owner values from lookup (symmetrical with Bearer).
Implementations§
Trait Implementations§
Source§impl A2aMiddleware for ApiKeyMiddleware
impl A2aMiddleware for ApiKeyMiddleware
Source§fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut RequestContext,
) -> Pin<Box<dyn Future<Output = Result<(), MiddlewareError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut RequestContext,
) -> Pin<Box<dyn Future<Output = Result<(), MiddlewareError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the request and populate identity on the context.
Source§fn security_contribution(&self) -> SecurityContribution
fn security_contribution(&self) -> SecurityContribution
Security contribution for AgentCard auto-population.
Auto Trait Implementations§
impl Freeze for ApiKeyMiddleware
impl !RefUnwindSafe for ApiKeyMiddleware
impl Send for ApiKeyMiddleware
impl Sync for ApiKeyMiddleware
impl Unpin for ApiKeyMiddleware
impl UnsafeUnpin for ApiKeyMiddleware
impl !UnwindSafe for ApiKeyMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more