pub struct GoogleServiceAccountAuthenticator { /* private fields */ }
Expand description
Authenticator service that ingest a Service Account JSON key file and communicates with Google’s authentication API to exchange it into a access token or an id token.
Implementations§
Source§impl GoogleServiceAccountAuthenticator
impl GoogleServiceAccountAuthenticator
Sourcepub fn new_from_service_account_key_file(
keyfile: &Path,
) -> Result<GoogleServiceAccountAuthenticator>
pub fn new_from_service_account_key_file( keyfile: &Path, ) -> Result<GoogleServiceAccountAuthenticator>
Function that builds new authenticator struct that later can be used to communicate with Google’s authentication API.
Sourcepub async fn request_access_token(&mut self) -> Result<GoogleAccessToken>
pub async fn request_access_token(&mut self) -> Result<GoogleAccessToken>
Request Access Token from Google’s authentication API
Sourcepub async fn request_id_token(&mut self, scope: String) -> Result<GoogleIDToken>
pub async fn request_id_token(&mut self, scope: String) -> Result<GoogleIDToken>
Request ID Token (JWT) from Google’s authentication API
Auto Trait Implementations§
impl Freeze for GoogleServiceAccountAuthenticator
impl RefUnwindSafe for GoogleServiceAccountAuthenticator
impl Send for GoogleServiceAccountAuthenticator
impl Sync for GoogleServiceAccountAuthenticator
impl Unpin for GoogleServiceAccountAuthenticator
impl UnwindSafe for GoogleServiceAccountAuthenticator
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