Skip to main content

SecretProvider

Trait SecretProvider 

Source
pub trait SecretProvider: Send + Sync {
    // Required methods
    fn get_private_key<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKey, SecretError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_app_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<GitHubAppId, SecretError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_webhook_secret<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cache_duration(&self) -> Duration;
}
Expand description

Interface for retrieving GitHub App secrets from secure storage.

Required Methods§

Source

fn get_private_key<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<PrivateKey, SecretError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get private key for JWT signing.

Source

fn get_app_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GitHubAppId, SecretError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get GitHub App ID.

Source

fn get_webhook_secret<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get webhook secret for signature validation.

Source

fn cache_duration(&self) -> Duration

Get cache duration for secrets.

Implementors§