pub trait AuthProvider:
Send
+ Sync
+ Debug {
// Required methods
fn name(&self) -> &str;
fn get_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
env: &'life1 str,
command: &'life2 str,
tier: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn logout<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_environments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Named auth provider used by middleware and transport injectors.
Implementations own their credential cache strategy. The framework only
routes calls and passes command context (env, colon command path, and tier).
Required Methods§
Sourcefn get_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
env: &'life1 str,
command: &'life2 str,
tier: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
env: &'life1 str,
command: &'life2 str,
tier: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns a credential for env, command, and tier.
Sourcefn status<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
env: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns cached credential status for one environment.