pub struct GitHubAppAuth<S, J, A, C>{ /* private fields */ }Expand description
Main GitHub App authentication provider.
Handles both app-level (JWT) and installation-level (installation token) authentication with intelligent caching and automatic refresh.
Implementations§
Source§impl<S, J, A, C> GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> GitHubAppAuth<S, J, A, C>
Sourcepub fn new(
secret_provider: S,
jwt_signer: J,
api_client: A,
token_cache: C,
config: AuthConfig,
) -> Self
pub fn new( secret_provider: S, jwt_signer: J, api_client: A, token_cache: C, config: AuthConfig, ) -> Self
Create a new GitHub App authentication provider.
Sourcepub fn config(&self) -> &AuthConfig
pub fn config(&self) -> &AuthConfig
Get configuration.
Trait Implementations§
Source§impl<S, J, A, C> AuthenticationProvider for GitHubAppAuth<S, J, A, C>where
S: SecretProvider + 'static,
J: JwtSigner + 'static,
A: GitHubApiClient + 'static,
C: TokenCache + 'static,
impl<S, J, A, C> AuthenticationProvider for GitHubAppAuth<S, J, A, C>where
S: SecretProvider + 'static,
J: JwtSigner + 'static,
A: GitHubApiClient + 'static,
C: TokenCache + 'static,
Source§fn app_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<JsonWebToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn app_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<JsonWebToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get JWT token for app-level GitHub API operations. Read more
Source§fn installation_token<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<InstallationToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn installation_token<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<InstallationToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get installation token for installation-level API operations. Read more
Source§fn refresh_installation_token<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<InstallationToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn refresh_installation_token<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<InstallationToken, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Refresh installation token (force new token generation). Read more
Source§fn list_installations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Installation>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_installations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Installation>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all installations for this GitHub App. Read more
Source§fn get_installation_repositories<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Repository>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_installation_repositories<'life0, 'async_trait>(
&'life0 self,
installation_id: InstallationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Repository>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get repositories accessible by installation. Read more
Auto Trait Implementations§
impl<S, J, A, C> Freeze for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> RefUnwindSafe for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> Send for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> Sync for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> Unpin for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> UnsafeUnpin for GitHubAppAuth<S, J, A, C>
impl<S, J, A, C> UnwindSafe for GitHubAppAuth<S, J, A, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more