pub struct LocalJwtValidator { /* private fields */ }Expand description
Production JWT validator backed by a dynamic JWKS provider.
Delegates Principal construction to a configurable ClaimsMapper,
allowing provider-specific claim shapes without hardcoding extraction logic.
Implementations§
Source§impl LocalJwtValidator
impl LocalJwtValidator
pub fn new( audience: Vec<String>, issuer: String, jwks: Arc<dyn JwksProvider>, mapper: Arc<dyn ClaimsMapper>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalJwtValidator
impl !RefUnwindSafe for LocalJwtValidator
impl Send for LocalJwtValidator
impl Sync for LocalJwtValidator
impl Unpin for LocalJwtValidator
impl UnsafeUnpin for LocalJwtValidator
impl !UnwindSafe for LocalJwtValidator
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> TokenAuthenticator for Twhere
T: JwtValidator,
impl<T> TokenAuthenticator for Twhere
T: JwtValidator,
Source§fn authenticate_bearer<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Principal, CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn authenticate_bearer<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Principal, CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Authenticate a Bearer token and return the associated
Principal.