Skip to main content

ExternalAuth

Trait ExternalAuth 

Source
pub trait ExternalAuth: Send + Sync {
    // Required methods
    fn resolve(&self) -> ExternalAuthFuture<'_, CodexAuth>;
    fn refresh(
        &self,
        context: ExternalAuthRefreshContext,
    ) -> ExternalAuthFuture<'_, CodexAuth>;
}
Expand description

Pluggable auth provider used by AuthManager for externally managed auth flows.

Implementations own the current auth value and any source-specific refresh mechanism.

Required Methods§

Source

fn resolve(&self) -> ExternalAuthFuture<'_, CodexAuth>

Returns the provider’s current auth value.

Source

fn refresh( &self, context: ExternalAuthRefreshContext, ) -> ExternalAuthFuture<'_, CodexAuth>

Refreshes auth and makes the returned value current for future resolve() calls.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§