pub trait DynamicAuthProvider:
Send
+ Sync
+ 'static {
// Required method
fn get_auth(
&self,
) -> Pin<Box<dyn Future<Output = Result<AuthProvider, KalamLinkError>> + Send + '_>>;
}Expand description
Async authentication provider called on every connect or reconnect.
Implement this trait to supply credentials lazily from any source: OAuth token refresh, secure storage, interactive login, etc.
Required Methods§
Sourcefn get_auth(
&self,
) -> Pin<Box<dyn Future<Output = Result<AuthProvider, KalamLinkError>> + Send + '_>>
fn get_auth( &self, ) -> Pin<Box<dyn Future<Output = Result<AuthProvider, KalamLinkError>> + Send + '_>>
Return the current (or freshly refreshed) credentials.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".