pub trait SessionRequest: Send + Sync {
// Required methods
fn session_headers(&self) -> &HashMap<String, String>;
fn session_method(&self) -> &HttpMethod;
fn session_query_truthy(&self, name: &str) -> bool;
fn extensions(&self) -> &RequestExtensions;
fn virtual_session<S: AuthSchema>(
&self,
context: &AuthContext<S>,
) -> Option<SessionView>;
fn take_response_headers(&self) -> Headers;
fn queue_response_header(
&self,
name: impl Into<String>,
value: impl Into<String>,
);
fn set_session_hook_snapshot(&self, user: UserView, session: SessionView);
// Provided methods
fn endpoint_call(&self) -> Option<&EndpointCall> { ... }
fn physical_request(&self) -> Option<&AuthRequest> { ... }
fn authenticated_user<S: AuthSchema>(
&self,
_context: &AuthContext<S>,
) -> Option<S::User> { ... }
}Expand description
Input and trusted state used by the shared physical/cache session readers. Implementations must never populate authenticated state from client data.
Required Methods§
fn session_headers(&self) -> &HashMap<String, String>
fn session_method(&self) -> &HttpMethod
fn session_query_truthy(&self, name: &str) -> bool
fn extensions(&self) -> &RequestExtensions
fn virtual_session<S: AuthSchema>( &self, context: &AuthContext<S>, ) -> Option<SessionView>
fn take_response_headers(&self) -> Headers
fn queue_response_header( &self, name: impl Into<String>, value: impl Into<String>, )
fn set_session_hook_snapshot(&self, user: UserView, session: SessionView)
Provided Methods§
Sourcefn endpoint_call(&self) -> Option<&EndpointCall>
fn endpoint_call(&self) -> Option<&EndpointCall>
Retain a genuine logical endpoint call when this input has one.
Sourcefn physical_request(&self) -> Option<&AuthRequest>
fn physical_request(&self) -> Option<&AuthRequest>
The original physical request, when the caller supplied one.
fn authenticated_user<S: AuthSchema>( &self, _context: &AuthContext<S>, ) -> Option<S::User>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".