pub struct AuthenticatorBuilder { /* private fields */ }Expand description
Configure an Authenticator using the builder pattern.
Implementations§
Source§impl AuthenticatorBuilder
impl AuthenticatorBuilder
Sourcepub fn client(self, client_builder: ClientBuilder) -> AuthenticatorBuilder
pub fn client(self, client_builder: ClientBuilder) -> AuthenticatorBuilder
Use the provided client builder.
Sourcepub fn persist_tokens_to_disk<P: Into<PathBuf>>(
self,
path: P,
) -> AuthenticatorBuilder
pub fn persist_tokens_to_disk<P: Into<PathBuf>>( self, path: P, ) -> AuthenticatorBuilder
Persist tokens to disk in the provided filename.
Sourcepub fn with_service_key(
key: ServiceAccountKey,
subject: &str,
) -> AuthenticatorBuilder
pub fn with_service_key( key: ServiceAccountKey, subject: &str, ) -> AuthenticatorBuilder
uses provided ServiceAccountKey and subject
Source§impl AuthenticatorBuilder
§Methods available when building a service account authenticator.
let authenticator = yup_oauth2::ServiceAccountAuthenticator::builder(
service_account_key,
)
.subject("mysubject")
.build()
.await
.expect("failed to create authenticator");
impl AuthenticatorBuilder
§Methods available when building a service account authenticator.
let authenticator = yup_oauth2::ServiceAccountAuthenticator::builder(
service_account_key,
)
.subject("mysubject")
.build()
.await
.expect("failed to create authenticator");Auto Trait Implementations§
impl !Freeze for AuthenticatorBuilder
impl !RefUnwindSafe for AuthenticatorBuilder
impl !Send for AuthenticatorBuilder
impl !Sync for AuthenticatorBuilder
impl Unpin for AuthenticatorBuilder
impl !UnwindSafe for AuthenticatorBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more