auth_io
library
Enums
-
ResponseType
-
Available response types that can be requested when using the implicit
browser login flow.
Functions
-
authenticatedClient(Client baseClient, AccessCredentials credentials, {bool closeUnderlyingClient = false})
→ AuthClient
-
Obtain a
Client
which automatically authenticates requests using
credentials
.
-
autoRefreshingClient(ClientId clientId, AccessCredentials credentials, Client baseClient, {AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ AutoRefreshingAuthClient
-
Creates an AutoRefreshingAuthClient which automatically refreshes
credentials
before they expire.
-
clientViaApiKey(String apiKey, {Client? baseClient})
→ Client
-
Obtains a
Client
which uses the given apiKey
for making HTTP
requests.
-
clientViaApplicationDefaultCredentials({required List<String> scopes, Client? baseClient})
→ Future<AutoRefreshingAuthClient>
-
Create a client using
Application Default Credentials.
-
clientViaMetadataServer({Client? baseClient})
→ Future<AutoRefreshingAuthClient>
-
Obtains oauth2 credentials and returns an authenticated HTTP client.
-
clientViaServiceAccount(ServiceAccountCredentials clientCredentials, List<String> scopes, {Client? baseClient})
→ Future<AutoRefreshingAuthClient>
-
Obtains oauth2 credentials and returns an authenticated HTTP client.
-
clientViaUserConsent(ClientId clientId, List<String> scopes, PromptUserForConsent userPrompt, {Client? baseClient, String? hostedDomain, int listenPort = 0, String? customPostAuthPage, AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AutoRefreshingAuthClient>
-
Obtains oauth2 credentials and returns an authenticated HTTP client.
-
clientViaUserConsentManual(ClientId clientId, List<String> scopes, PromptUserForConsentManual userPrompt, {Client? baseClient, String? hostedDomain, AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AutoRefreshingAuthClient>
-
Obtains oauth2 credentials and returns an authenticated HTTP client.
-
obtainAccessCredentialsViaCodeExchange(Client client, ClientId clientId, String code, {String redirectUrl = 'postmessage', String? codeVerifier, AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AccessCredentials>
-
Obtain oauth2 AccessCredentials by exchanging an authorization code.
-
obtainAccessCredentialsViaMetadataServer(Client client)
→ Future<AccessCredentials>
-
Obtain oauth2 AccessCredentials using the metadata API on ComputeEngine.
-
obtainAccessCredentialsViaServiceAccount(ServiceAccountCredentials clientCredentials, List<String> scopes, Client client)
→ Future<AccessCredentials>
-
Obtain oauth2 AccessCredentials using service account credentials.
-
obtainAccessCredentialsViaUserConsent(ClientId clientId, List<String> scopes, Client client, PromptUserForConsent userPrompt, {String? hostedDomain, int listenPort = 0, String? customPostAuthPage, AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AccessCredentials>
-
Obtain oauth2 AccessCredentials using the oauth2 authentication code flow.
-
obtainAccessCredentialsViaUserConsentManual(ClientId clientId, List<String> scopes, Client client, PromptUserForConsentManual userPrompt, {String? hostedDomain, AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AccessCredentials>
-
Obtain oauth2 AccessCredentials using the oauth2 authentication code flow.
-
refreshCredentials(ClientId clientId, AccessCredentials credentials, Client client, {AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AccessCredentials>
-
Obtains refreshed AccessCredentials for
clientId
and credentials
.