pub struct AuthMiddlewareState {
pub provider: DynAuthProvider,
pub require_auth: bool,
}Expand description
Configuration carried by the Axum middleware layer.
Fields§
§provider: DynAuthProviderThe provider used to validate incoming credentials.
require_auth: boolWhen true, requests with no credentials are rejected with 401.
When false, unauthenticated requests proceed (identity stays None).
Trait Implementations§
Source§impl Clone for AuthMiddlewareState
impl Clone for AuthMiddlewareState
Source§fn clone(&self) -> AuthMiddlewareState
fn clone(&self) -> AuthMiddlewareState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthMiddlewareState
impl !RefUnwindSafe for AuthMiddlewareState
impl Send for AuthMiddlewareState
impl Sync for AuthMiddlewareState
impl Unpin for AuthMiddlewareState
impl UnsafeUnpin for AuthMiddlewareState
impl !UnwindSafe for AuthMiddlewareState
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