pub enum BeforeRequestAction {
Respond(AuthResponse),
InjectSession {
user_id: String,
session_token: String,
},
}Expand description
Action returned by AuthPlugin::before_request.
Variants§
Respond(AuthResponse)
Short-circuit with this response (e.g. return session JSON).
InjectSession
Inject a virtual session so downstream handlers see it as authenticated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BeforeRequestAction
impl RefUnwindSafe for BeforeRequestAction
impl Send for BeforeRequestAction
impl Sync for BeforeRequestAction
impl Unpin for BeforeRequestAction
impl UnsafeUnpin for BeforeRequestAction
impl UnwindSafe for BeforeRequestAction
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