pub struct RequireAuth { /* private fields */ }Expand description
Middleware that requires authentication for admin routes.
Excludes login and logout paths. Redirects unauthenticated users to the login page.
Implementations§
Trait Implementations§
Source§impl<S> Transform<S, ServiceRequest> for RequireAuthwhere
S: Service<ServiceRequest, Response = ServiceResponse<BoxBody>, Error = Error> + 'static,
S::Future: 'static,
impl<S> Transform<S, ServiceRequest> for RequireAuthwhere
S: Service<ServiceRequest, Response = ServiceResponse<BoxBody>, Error = Error> + 'static,
S::Future: 'static,
Source§type Response = ServiceResponse
type Response = ServiceResponse
Responses produced by the service.
Source§type Transform = RequireAuthMiddleware<S>
type Transform = RequireAuthMiddleware<S>
The
TransformService value created by this factorySource§type Future = Ready<Result<<RequireAuth as Transform<S, ServiceRequest>>::Transform, <RequireAuth as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<RequireAuth as Transform<S, ServiceRequest>>::Transform, <RequireAuth as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl Freeze for RequireAuth
impl RefUnwindSafe for RequireAuth
impl Send for RequireAuth
impl Sync for RequireAuth
impl Unpin for RequireAuth
impl UnsafeUnpin for RequireAuth
impl UnwindSafe for RequireAuth
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