AsyncAuthProvider

Trait AsyncAuthProvider 

Source
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§

Source

fn method(&self) -> AuthMethod

Get the authentication method this provider uses.

Source

async fn authenticate_async(&self) -> Result<AuthData, AuthError>

Authenticate asynchronously and produce authentication data.

Provided Methods§

Source

fn feature_extension_data(&self) -> Option<Bytes>

Get additional feature extension data for Login7.

Source

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", so this trait is not object safe.

Implementors§