pub trait Authenticate {
    fn get_valid_token<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Arc<String>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

trait for methods that result in the acquisition of tokens usable in Bearer token authentication for Microsoft Dataverse calls

see get_valid_token(...) for more details

Required Methods

Authenticates the current instance and returns the Bearer token to use in subsequent Microsoft Dataverse calls

Aquired tokens should be cached and reused as long as they are valid and then refreshed when necessary

Implementations should propagate hard authentication errors but may handle soft errors with their own strategies like retries

Implementors