pub trait AsyncAuthProvider: Send + Sync {
// Required methods
fn method(&self) -> AuthMethod;
async fn authenticate_async(&self) -> Result<AuthData, AuthError>;
// Provided methods
fn feature_extension_data(&self) -> Option<Bytes> { ... }
fn needs_refresh(&self) -> bool { ... }
}Expand description
Async authentication provider trait.
This is for authentication methods that require async operations, such as acquiring tokens from Azure AD endpoints.
Required Methods§
Sourcefn method(&self) -> AuthMethod
fn method(&self) -> AuthMethod
Get the authentication method this provider uses.
Sourceasync fn authenticate_async(&self) -> Result<AuthData, AuthError>
async fn authenticate_async(&self) -> Result<AuthData, AuthError>
Authenticate asynchronously and produce authentication data.
Provided Methods§
Sourcefn feature_extension_data(&self) -> Option<Bytes>
fn feature_extension_data(&self) -> Option<Bytes>
Get additional feature extension data for Login7.
Sourcefn needs_refresh(&self) -> bool
fn needs_refresh(&self) -> bool
Check if this provider needs to refresh its authentication.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".