clientViaMetadataServer function

Future<AutoRefreshingAuthClient> clientViaMetadataServer({
  1. Client? baseClient,
})

Obtains oauth2 credentials and returns an authenticated HTTP client.

See obtainAccessCredentialsViaMetadataServer for specifics about the arguments used for obtaining access credentials.

If baseClient is provided, all HTTP requests will be made with it. Otherwise, a new Client instance will be created.

The user is responsible for closing the returned HTTP Client. Closing the returned Client will not close baseClient.

Implementation

Future<AutoRefreshingAuthClient> clientViaMetadataServer({
  Client? baseClient,
}) async =>
    await clientFromFlow(
      MetadataServerAuthorizationFlow.new,
      baseClient: baseClient,
    );