pub trait AuthProviderFlow: Send + Sync {
// Provided methods
fn login<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_device_code: bool,
_import: Option<&'life4 Path>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn paste_redirect<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_input: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn refresh_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile_override: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<RefreshStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Provided Methods§
Sourcefn login<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_device_code: bool,
_import: Option<&'life4 Path>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn login<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_device_code: bool,
_import: Option<&'life4 Path>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Run the OAuth login flow. The default impl bails — only providers
with an OAuth login flow override. import is a path to an
existing token-set JSON file for providers that support importing
already-issued credentials (OpenAI Codex ~/.codex/auth.json).
Sourcefn paste_redirect<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_input: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn paste_redirect<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile: &'life3 str,
_input: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Resume an OAuth login from a paste-redirect URL/code. The default impl bails for providers that don’t expose a browser flow.
Sourcefn refresh_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile_override: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<RefreshStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn refresh_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 AuthFlowContext<'life2>,
_profile_override: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<RefreshStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Refresh the access token for profile_override (or active
profile) and report status. Default impl bails for providers
without a refresh flow.