Skip to main content

AuthExtractor

Trait AuthExtractor 

Source
pub trait AuthExtractor<S = ()>:
    FromRequestParts<S>
    + Send
    + Sync
    + 'static { }
Expand description

Per-request identity extractor.

This is just a marker alias for FromRequestParts — any Axum extractor that yields a typed identity (User, SessionToken, etc.) satisfies it. Consumers choose the representation.

Rejections must map to BucketError::Unauthenticated via the [AuthExtractor::Rejection] conversion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, S> AuthExtractor<S> for T
where T: FromRequestParts<S> + Send + Sync + 'static,