Struct github_app_auth::InstallationAccessToken
source · pub struct InstallationAccessToken {
pub client: Client,
pub refresh_safety_margin: Duration,
/* private fields */
}
Expand description
An installation access token is the primary method for authenticating with the GitHub API as an application.
Fields§
§client: Client
The reqwest::Client
used to periodically refresh
the token.
This is made public so that users of the library can re-use this client for sending requests, but this is not required.
refresh_safety_margin: Duration
This time is subtracted from the expiration time to make it less likely that the token goes out of date just as a request is sent.
Implementations§
source§impl InstallationAccessToken
impl InstallationAccessToken
sourcepub async fn new(
params: GithubAuthParams
) -> Result<InstallationAccessToken, AuthError>
pub async fn new( params: GithubAuthParams ) -> Result<InstallationAccessToken, AuthError>
Fetch an installation access token using the provided authentication parameters.
Auto Trait Implementations§
impl Freeze for InstallationAccessToken
impl !RefUnwindSafe for InstallationAccessToken
impl Send for InstallationAccessToken
impl Sync for InstallationAccessToken
impl Unpin for InstallationAccessToken
impl !UnwindSafe for InstallationAccessToken
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