pub struct SessionMiddlewareConfig {
pub auth_config: McpAuthConfig,
pub enable_sessions: bool,
pub require_sessions: bool,
pub enable_jwt_auth: bool,
pub jwt_header_name: String,
pub session_header_name: String,
pub auto_create_sessions: bool,
pub auto_session_duration: Option<Duration>,
pub extend_sessions_on_access: bool,
pub session_exempt_methods: Vec<String>,
}
Expand description
Enhanced configuration for session-aware middleware
Fields§
§auth_config: McpAuthConfig
Base MCP auth configuration
enable_sessions: bool
Enable session management
require_sessions: bool
Require sessions for authenticated requests
enable_jwt_auth: bool
Enable JWT token authentication
jwt_header_name: String
JWT token header name
session_header_name: String
Session ID header name
auto_create_sessions: bool
Enable automatic session creation for API keys
auto_session_duration: Option<Duration>
Session duration for auto-created sessions
extend_sessions_on_access: bool
Enable session extension on access
session_exempt_methods: Vec<String>
Methods that bypass session requirements
Trait Implementations§
Source§impl Clone for SessionMiddlewareConfig
impl Clone for SessionMiddlewareConfig
Source§fn clone(&self) -> SessionMiddlewareConfig
fn clone(&self) -> SessionMiddlewareConfig
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 moreSource§impl Debug for SessionMiddlewareConfig
impl Debug for SessionMiddlewareConfig
Auto Trait Implementations§
impl Freeze for SessionMiddlewareConfig
impl RefUnwindSafe for SessionMiddlewareConfig
impl Send for SessionMiddlewareConfig
impl Sync for SessionMiddlewareConfig
impl Unpin for SessionMiddlewareConfig
impl UnwindSafe for SessionMiddlewareConfig
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