pub struct ServiceAccountImpersonationAuthenticator;
Expand description
Create a access token authenticator that uses user secrets to impersonate a service account.
let authenticator = yup_oauth2::ServiceAccountImpersonationAuthenticator::builder(secret, email)
.build()
.await
.expect("failed to create authenticator");
Implementations§
source§impl ServiceAccountImpersonationAuthenticator
impl ServiceAccountImpersonationAuthenticator
sourcepub fn builder(
authorized_user_secret: AuthorizedUserSecret,
service_account_email: &str,
) -> AuthenticatorBuilder<DefaultHyperClient, ServiceAccountImpersonationFlow>
Available on crate features hyper-rustls
or hyper-tls
only.
pub fn builder( authorized_user_secret: AuthorizedUserSecret, service_account_email: &str, ) -> AuthenticatorBuilder<DefaultHyperClient, ServiceAccountImpersonationFlow>
hyper-rustls
or hyper-tls
only.Use the builder pattern to create an Authenticator that uses the device flow.
sourcepub fn with_client<C>(
authorized_user_secret: AuthorizedUserSecret,
service_account_email: &str,
client: C,
) -> AuthenticatorBuilder<C, ServiceAccountImpersonationFlow>
pub fn with_client<C>( authorized_user_secret: AuthorizedUserSecret, service_account_email: &str, client: C, ) -> AuthenticatorBuilder<C, ServiceAccountImpersonationFlow>
Construct a new Authenticator that uses the installed flow and the provided http client.
Auto Trait Implementations§
impl Freeze for ServiceAccountImpersonationAuthenticator
impl RefUnwindSafe for ServiceAccountImpersonationAuthenticator
impl Send for ServiceAccountImpersonationAuthenticator
impl Sync for ServiceAccountImpersonationAuthenticator
impl Unpin for ServiceAccountImpersonationAuthenticator
impl UnwindSafe for ServiceAccountImpersonationAuthenticator
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