pub struct JwtCallbacks<S: AuthSchema> { /* private fields */ }Expand description
Independent key reads and writes for one registered JWT plugin.
Implementations§
Source§impl<S: AuthSchema> JwtCallbacks<S>
impl<S: AuthSchema> JwtCallbacks<S>
Sourcepub fn get_jwks<F>(self, callback: F) -> Selfwhere
F: for<'a> Fn(&'a EndpointContext<'_, S>) -> JwtAdapterFuture<'a, Option<Vec<Jwk>>> + Send + Sync + 'static,
pub fn get_jwks<F>(self, callback: F) -> Selfwhere
F: for<'a> Fn(&'a EndpointContext<'_, S>) -> JwtAdapterFuture<'a, Option<Vec<Jwk>>> + Send + Sync + 'static,
Read a custom keyring. None represents an absent keyset, not a database fallback.
Sourcepub fn create_jwk<F>(self, callback: F) -> Selfwhere
F: for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> JwtAdapterFuture<'a, Jwk> + Send + Sync + 'static,
pub fn create_jwk<F>(self, callback: F) -> Selfwhere
F: for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> JwtAdapterFuture<'a, Jwk> + Send + Sync + 'static,
Persist generated key material and return the stored key, including its identifier.
Trait Implementations§
Source§impl<S: AuthSchema> Default for JwtCallbacks<S>
impl<S: AuthSchema> Default for JwtCallbacks<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for JwtCallbacks<S>
impl<S> !UnwindSafe for JwtCallbacks<S>
impl<S> Freeze for JwtCallbacks<S>where
Option<Arc<dyn for<'a> Fn(&'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Jwk>>, AuthError>> + Send + 'a>> + Send + Sync>>: Freeze,
Option<Arc<dyn for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Jwk, AuthError>> + Send + 'a>> + Send + Sync>>: Freeze,
impl<S> Send for JwtCallbacks<S>where
Option<Arc<dyn for<'a> Fn(&'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Jwk>>, AuthError>> + Send + 'a>> + Send + Sync>>: Send,
Option<Arc<dyn for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Jwk, AuthError>> + Send + 'a>> + Send + Sync>>: Send,
impl<S> Sync for JwtCallbacks<S>where
Option<Arc<dyn for<'a> Fn(&'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Jwk>>, AuthError>> + Send + 'a>> + Send + Sync>>: Sync,
Option<Arc<dyn for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Jwk, AuthError>> + Send + 'a>> + Send + Sync>>: Sync,
impl<S> Unpin for JwtCallbacks<S>where
Option<Arc<dyn for<'a> Fn(&'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Jwk>>, AuthError>> + Send + 'a>> + Send + Sync>>: Unpin,
Option<Arc<dyn for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Jwk, AuthError>> + Send + 'a>> + Send + Sync>>: Unpin,
impl<S> UnsafeUnpin for JwtCallbacks<S>where
Option<Arc<dyn for<'a> Fn(&'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Jwk>>, AuthError>> + Send + 'a>> + Send + Sync>>: UnsafeUnpin,
Option<Arc<dyn for<'a> Fn(CreateJwk, &'a EndpointContext<'_, S>) -> Pin<Box<dyn Future<Output = Result<Jwk, AuthError>> + Send + 'a>> + Send + Sync>>: UnsafeUnpin,
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