pub enum TokenProviderWrapper {
    EndUser(EndUserCredentials),
    Metadata(MetadataServerProvider),
    ServiceAccount(ServiceAccountProvider),
}
Expand description

Wrapper around the different providers that are supported

Variants§

Implementations§

Get a TokenProvider following the “Google Default Credentials” flow, in order:

If it appears that a method is being used, but is actually invalid, eg GOOGLE_APPLICATION_CREDENTIALS is set but the file doesn’t exist or contains invalid JSON, an error is returned with the details

Gets the kind of token provider

Trait Implementations§

Like TokenProvider::get_token, but allows the JWT “subject” to be passed in.
Once a response has been received for a token request, call this method to deserialize the token (and potentially store it in a local cache for reuse until it expires).
Attempts to retrieve a token that can be used in an API request, if we haven’t already retrieved a token for the specified scopes, or the token has expired, an HTTP request is returned that can be used to retrieve a token. Read more

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.

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.