pub struct DynamicAuthResolver { /* private fields */ }Expand description
Auth resolver that calls an AuthProvider for a specific user/tenant/resource.
Created per-task by McpTransportPool::tools_for_user() and stamped onto each
McpTool so that tool execution injects per-user auth at call time.
Implementations§
Source§impl DynamicAuthResolver
impl DynamicAuthResolver
pub fn new( provider: Arc<dyn AuthProvider>, user_id: impl Into<String>, tenant_id: impl Into<String>, ) -> Self
Sourcepub fn with_resource(self, resource: Option<String>) -> Self
pub fn with_resource(self, resource: Option<String>) -> Self
Set the RFC 8707 resource indicator for audience-bound tokens.
Sourcepub fn with_scopes(self, scopes: Option<Vec<String>>) -> Self
pub fn with_scopes(self, scopes: Option<Vec<String>>) -> Self
Set OAuth scopes for this MCP server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DynamicAuthResolver
impl !RefUnwindSafe for DynamicAuthResolver
impl Send for DynamicAuthResolver
impl Sync for DynamicAuthResolver
impl Unpin for DynamicAuthResolver
impl UnsafeUnpin for DynamicAuthResolver
impl !UnwindSafe for DynamicAuthResolver
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