pub struct StaticTokenVerifier { /* private fields */ }Expand description
Static token verifier backed by fixed-width token digests.
Implementations§
Source§impl StaticTokenVerifier
impl StaticTokenVerifier
Sourcepub fn new<I, K>(tokens: I) -> McpResult<Self>
pub fn new<I, K>(tokens: I) -> McpResult<Self>
Creates a new static verifier from a token → context map.
Every configured credential must resolve to an admissible authenticated owner. Rejecting ownerless or oversized facts here prevents a verifier configuration that succeeds in isolation but is guaranteed to fail at the server’s authentication-admission boundary.
Sourcepub fn with_allowed_schemes<I, S>(self, schemes: I) -> McpResult<Self>
pub fn with_allowed_schemes<I, S>(self, schemes: I) -> McpResult<Self>
Restricts accepted token schemes (case-insensitive).
Trait Implementations§
Source§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,
) -> McpResult<AuthContext>
fn verify( &self, _ctx: &McpContext, _request: AuthRequest<'_>, token: &AccessToken, ) -> McpResult<AuthContext>
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 UnsafeUnpin for StaticTokenVerifier
impl UnwindSafe for StaticTokenVerifier
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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).