googleapis_auth library
Contains common libraries used across the package.
In most cases, you'll want to import either auth_io or auth_browser depending on your platform.
Classes
- AccessCredentials
- OAuth2 Credentials.
- AccessToken
- An OAuth2 access token.
- AuthClient
- A authenticated HTTP client.
- AutoRefreshingAuthClient
- A auto-refreshing, authenticated HTTP client.
- ClientId
- Represents the client application's credentials.
- ServiceAccountCredentials
- Represents credentials for a service account.
Functions
-
authenticatedClient(
Client baseClient, AccessCredentials credentials, {bool closeUnderlyingClient = false}) → AuthClient -
Obtain a
Client
which automatically authenticates requests usingcredentials
. -
autoRefreshingClient(
ClientId clientId, AccessCredentials credentials, Client baseClient) → AutoRefreshingAuthClient -
Creates an AutoRefreshingAuthClient which automatically refreshes
credentials
before they expire. -
clientViaApiKey(
String apiKey, {Client? baseClient}) → Client -
Obtains a
Client
which uses the givenapiKey
for making HTTP requests. -
refreshCredentials(
ClientId clientId, AccessCredentials credentials, Client client) → Future< AccessCredentials> -
Obtains refreshed AccessCredentials for
clientId
andcredentials
.
Enums
- ResponseType
- Available response types that can be requested when using the implicit browser login flow.
Typedefs
- RefreshFailedException = ServerRequestFailedException
- No longer used. Replaced by ServerRequestFailedException.
Exceptions / Errors
- AccessDeniedException
- Thrown if an attempt to make an authorized request failed.
- ServerRequestFailedException
- Thrown when a request to or the response from an authentication service is invalid.
- UserConsentException
- Thrown if user did not give their consent.