Skip to main content

AuthResolver

Trait AuthResolver 

Source
pub trait AuthResolver: Send + Sync {
    // Required method
    fn resolve(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + '_>>;
}
Expand description

Resolves an Authorization header at tool-call time.

Unlike AuthProvider (which is a shared service), AuthResolver is stamped per-user onto each McpTool instance so that a shared transport can carry different credentials per request.

Required Methods§

Source

fn resolve( &self, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + '_>>

Resolve the Authorization header value for the current request.

Implementors§