pub struct AuthenticatorBuilder<C, F> { /* private fields */ }
Expand description

Configure an Authenticator using the builder pattern.

Implementations

Methods available when building any Authenticator.
    let authenticator = yup_oauth2::DeviceFlowAuthenticator::builder(app_secret)
        .hyper_client(custom_hyper_client)
        .persist_tokens_to_disk("/tmp/tokenfile.json")
        .build()
        .await
        .expect("failed to create authenticator");

Use the provided token storage mechanism

Use the provided hyper client.

Persist tokens to disk in the provided filename.

Methods available when building a device flow Authenticator.
    let authenticator = yup_oauth2::DeviceFlowAuthenticator::builder(app_secret)
        .device_code_url("foo")
        .flow_delegate(Box::new(custom_flow_delegate))
        .grant_type("foo")
        .build()
        .await
        .expect("failed to create authenticator");

Use the provided device code url.

Use the provided DeviceFlowDelegate.

Use the provided grant type.

Create the authenticator.

Methods available when building an installed flow Authenticator.
    let authenticator = yup_oauth2::InstalledFlowAuthenticator::builder(
        app_secret,
        InstalledFlowReturnMethod::HTTPRedirect,
    )
    .flow_delegate(Box::new(custom_flow_delegate))
    .build()
    .await
    .expect("failed to create authenticator");

Use the provided InstalledFlowDelegate.

Create the authenticator.

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");

Use the provided subject.

Create the authenticator.

Create the authenticator.

Create the authenticator.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more