AuthConfig.apiKey constructor

AuthConfig.apiKey(
  1. String apiKey, {
  2. List<ApiScope> scopes = const [ApiScope.read],
})

Creates an API key authentication configuration.

apiKey - API key for authentication. scopes - Scopes for the API key.

Implementation

factory AuthConfig.apiKey(String apiKey,
    {List<ApiScope> scopes = const [ApiScope.read]}) {
  return AuthConfig(
    token: apiKey,
    method: AuthMethod.apiKey,
    scopes: scopes,
  );
}