[][src]Struct yup_oauth2::ServiceAccountAccess

pub struct ServiceAccountAccess<C> { /* fields omitted */ }

A token source (GetToken) yielding OAuth tokens for services that use ServiceAccount authorization. This token source caches token and automatically renews expired ones, meaning you do not need (and you also should not) use this with Authenticator. Just use it directly.

Methods

impl<'a, C: 'static + Connect> ServiceAccountAccess<C>[src]

pub fn new(
    key: ServiceAccountKey,
    client: Client<C, Body>
) -> ServiceAccountAccess<C>
[src]

Returns a new ServiceAccountAccess token source.

pub fn with_sub(
    key: ServiceAccountKey,
    client: Client<C, Body>,
    sub: String
) -> ServiceAccountAccess<C>
[src]

Set sub claim in new ServiceAccountKey (see https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests).

Trait Implementations

impl<C: 'static> GetToken for ServiceAccountAccess<C> where
    C: Connect
[src]

fn application_secret(&self) -> ApplicationSecret[src]

Returns an empty ApplicationSecret as tokens for service accounts don't need to be refreshed (they are simply reissued).

impl<C: Clone> Clone for ServiceAccountAccess<C>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<C> Send for ServiceAccountAccess<C> where
    C: Send + Sync

impl<C> Unpin for ServiceAccountAccess<C>

impl<C> Sync for ServiceAccountAccess<C> where
    C: Send + Sync

impl<C> !UnwindSafe for ServiceAccountAccess<C>

impl<C> !RefUnwindSafe for ServiceAccountAccess<C>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T