pub struct AuthRequestContext {
pub method: String,
pub path: String,
pub hostname: String,
pub headers: Vec<(String, String)>,
pub query_string: String,
pub peer_ip: Option<String>,
pub tenant_id: Option<String>,
pub site_id: Option<String>,
pub session_id: Option<String>,
}Expand description
Per-request context passed to every AuthPlugin method.
Pure data, no framework types — matches middleware::RequestContext
conventions so plugins can live behind the same sandbox boundary.
Mirrors the JWT middleware’s token-extraction sources (Authorization
header, cookies) without hardcoding either.
Fields§
§method: String§path: String§hostname: String§headers: Vec<(String, String)>§query_string: String§peer_ip: Option<String>§tenant_id: Option<String>§site_id: Option<String>§session_id: Option<String>Opaque session id previously issued via the Session capability,
if any. None for first-time/anonymous requests.
Trait Implementations§
Source§impl Clone for AuthRequestContext
impl Clone for AuthRequestContext
Source§fn clone(&self) -> AuthRequestContext
fn clone(&self) -> AuthRequestContext
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 AuthRequestContext
impl RefUnwindSafe for AuthRequestContext
impl Send for AuthRequestContext
impl Sync for AuthRequestContext
impl Unpin for AuthRequestContext
impl UnsafeUnpin for AuthRequestContext
impl UnwindSafe for AuthRequestContext
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