pub struct JwkProviderRegistry { /* private fields */ }Expand description
Registry for managing multiple JWK providers
Implementations§
Source§impl JwkProviderRegistry
impl JwkProviderRegistry
Sourcepub fn register(
&self,
id: &str,
provider: JwkProvider,
) -> Result<(), RegistryError>
pub fn register( &self, id: &str, provider: JwkProvider, ) -> Result<(), RegistryError>
Register a new JWK provider
Sourcepub fn register_new(
&self,
id: &str,
region: &str,
user_pool_id: &str,
cache_duration: Duration,
) -> Result<(), RegistryError>
pub fn register_new( &self, id: &str, region: &str, user_pool_id: &str, cache_duration: Duration, ) -> Result<(), RegistryError>
Create and register a new JWK provider
Sourcepub fn get(&self, id: &str) -> Result<Arc<JwkProvider>, RegistryError>
pub fn get(&self, id: &str) -> Result<Arc<JwkProvider>, RegistryError>
Get a JWK provider by ID
Sourcepub fn get_by_issuer(
&self,
issuer: &str,
) -> Result<Arc<JwkProvider>, RegistryError>
pub fn get_by_issuer( &self, issuer: &str, ) -> Result<Arc<JwkProvider>, RegistryError>
Get a JWK provider by issuer URL
Sourcepub fn find_provider_id_by_issuer(
&self,
issuer: &str,
) -> Result<String, RegistryError>
pub fn find_provider_id_by_issuer( &self, issuer: &str, ) -> Result<String, RegistryError>
Find a provider ID by issuer URL
Sourcepub async fn hydrate(&self) -> Vec<(String, Result<(), JwtError>)>
pub async fn hydrate(&self) -> Vec<(String, Result<(), JwtError>)>
Prefetch keys for all providers
Sourcepub async fn prefetch(&self, id: &str) -> Result<(), RegistryError>
pub async fn prefetch(&self, id: &str) -> Result<(), RegistryError>
Prefetch keys for a specific provider
Sourcepub fn create_validation_for_issuer(
&self,
issuer: &str,
clock_skew: Duration,
client_ids: &Vec<String>,
) -> Result<Validation, RegistryError>
pub fn create_validation_for_issuer( &self, issuer: &str, clock_skew: Duration, client_ids: &Vec<String>, ) -> Result<Validation, RegistryError>
Create a validation object for a specific issuer
Trait Implementations§
Source§impl Debug for JwkProviderRegistry
impl Debug for JwkProviderRegistry
Auto Trait Implementations§
impl !Freeze for JwkProviderRegistry
impl RefUnwindSafe for JwkProviderRegistry
impl Send for JwkProviderRegistry
impl Sync for JwkProviderRegistry
impl Unpin for JwkProviderRegistry
impl UnwindSafe for JwkProviderRegistry
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.