Skip to main content

StreamingCredentialsProvider

Trait StreamingCredentialsProvider 

Source
pub trait StreamingCredentialsProvider: Send + Sync {
    // Required method
    fn subscribe(
        &self,
    ) -> Pin<Box<dyn Stream<Item = RedisResult<BasicAuth>> + Send + 'static>>;
}
Available on crate feature token-based-authentication only.
Expand description

Trait for providing credentials in a streaming fashion

This allows connections to subscribe to credential updates and automatically re-authenticate when tokens are refreshed, preventing connection failures due to token expiration.

Required Methods§

Source

fn subscribe( &self, ) -> Pin<Box<dyn Stream<Item = RedisResult<BasicAuth>> + Send + 'static>>

Get an independent stream of credentials.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl StreamingCredentialsProvider for EntraIdCredentialsProvider

Available on crate feature entra-id only.