pub trait GitHubTokenProvider: Send + Sync {
// Required method
fn get_token<'life0, 'async_trait>(
&'life0 self,
args: GitHubTokenProviderArgs,
) -> Pin<Box<dyn Future<Output = Result<GitHubTokenProviderResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Async callback used to acquire GitHub tokens for one session.
Required Methods§
Sourcefn get_token<'life0, 'async_trait>(
&'life0 self,
args: GitHubTokenProviderArgs,
) -> Pin<Box<dyn Future<Output = Result<GitHubTokenProviderResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_token<'life0, 'async_trait>(
&'life0 self,
args: GitHubTokenProviderArgs,
) -> Pin<Box<dyn Future<Output = Result<GitHubTokenProviderResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquire a token or explicitly cancel the request.
Initial cancellation, errors, and invalid token responses reject session creation or resume instead of falling back to ambient authentication.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".