pub struct StaticTokenVerifier { /* private fields */ }Expand description
Static token verifier backed by an in-memory token map.
Implementations§
Source§impl StaticTokenVerifier
impl StaticTokenVerifier
Sourcepub fn new<I, K>(tokens: I) -> StaticTokenVerifier
pub fn new<I, K>(tokens: I) -> StaticTokenVerifier
Creates a new static verifier from a token → context map.
Sourcepub fn with_allowed_schemes<I, S>(self, schemes: I) -> StaticTokenVerifier
pub fn with_allowed_schemes<I, S>(self, schemes: I) -> StaticTokenVerifier
Restricts accepted token schemes (case-insensitive).
Trait Implementations§
Source§impl Clone for StaticTokenVerifier
impl Clone for StaticTokenVerifier
Source§fn clone(&self) -> StaticTokenVerifier
fn clone(&self) -> StaticTokenVerifier
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 StaticTokenVerifier
impl Debug for StaticTokenVerifier
Source§impl TokenVerifier for StaticTokenVerifier
impl TokenVerifier for StaticTokenVerifier
Source§fn verify(
&self,
_ctx: &McpContext,
_request: AuthRequest<'_>,
token: &AccessToken,
) -> Result<AuthContext, McpError>
fn verify( &self, _ctx: &McpContext, _request: AuthRequest<'_>, token: &AccessToken, ) -> Result<AuthContext, McpError>
Verify an access token and return an auth context if valid.
Auto Trait Implementations§
impl Freeze for StaticTokenVerifier
impl RefUnwindSafe for StaticTokenVerifier
impl Send for StaticTokenVerifier
impl Sync for StaticTokenVerifier
impl Unpin for StaticTokenVerifier
impl UnwindSafe for StaticTokenVerifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).